#1   Report Post  
Posted to microsoft.public.excel.misc
docnige
 
Posts: n/a
Default IF AND formulas

I have a table with values 1 and 2 in column B and I wish to know what the
results in columns B to X are based on this i.e If column A equals 1 and
column B equals 1 then I want to return a count of 1. And so on: if column A
equals 1 and column B equals 2 then return a count of 1. Can I also do this
for ranges if column C equals 10-20 and column B equals 1 then return a count
of 1. I have tried SUMIF, AND and IF in the Help but can't understand how to
the above?

Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
duane
 
Posts: n/a
Default IF AND formulas

try this (for data in rows 1:100) (with assumed result of zero fo no
occurances)

=if(sumproduct((a1:a100=1)*(b1:b100=2))0,1,0)

=if(sumproduct((c1:c100=10)*(c1:c100<=20)*(b1:b10 0=1))0,1,0)

"docnige" wrote:

I have a table with values 1 and 2 in column B and I wish to know what the
results in columns B to X are based on this i.e If column A equals 1 and
column B equals 1 then I want to return a count of 1. And so on: if column A
equals 1 and column B equals 2 then return a count of 1. Can I also do this
for ranges if column C equals 10-20 and column B equals 1 then return a count
of 1. I have tried SUMIF, AND and IF in the Help but can't understand how to
the above?

Thanks for the help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
docnige
 
Posts: n/a
Default IF AND formulas

That is a start but it only returns the value 1, I want it to add all
occurences in the table where column B for example equals 1 and column F
equals 1 etc. So

Column B Column F
1 1
1 2
1 1
2 1

In this example the formula would return 2 for the above example.

I think this makes it clearer.


"duane" wrote:

try this (for data in rows 1:100) (with assumed result of zero fo no
occurances)

=if(sumproduct((a1:a100=1)*(b1:b100=2))0,1,0)

=if(sumproduct((c1:c100=10)*(c1:c100<=20)*(b1:b10 0=1))0,1,0)

"docnige" wrote:

I have a table with values 1 and 2 in column B and I wish to know what the
results in columns B to X are based on this i.e If column A equals 1 and
column B equals 1 then I want to return a count of 1. And so on: if column A
equals 1 and column B equals 2 then return a count of 1. Can I also do this
for ranges if column C equals 10-20 and column B equals 1 then return a count
of 1. I have tried SUMIF, AND and IF in the Help but can't understand how to
the above?

Thanks for the help.

  #4   Report Post  
Posted to microsoft.public.excel.misc
duane
 
Posts: n/a
Default IF AND formulas

try thi 9for rows 1:100 - adjust row range needed

=sumproduct((a1:a100=1)*(b1:b100=2))

adds occurances for 1 in column a and 2 in column b

=sumproduct((c1:c100=10)*(c1:c100<=20)*(b1:b100=1 ))

adds occurances for 10-20 in column c and 1 in column b


"docnige" wrote:

That is a start but it only returns the value 1, I want it to add all
occurences in the table where column B for example equals 1 and column F
equals 1 etc. So

Column B Column F
1 1
1 2
1 1
2 1

In this example the formula would return 2 for the above example.

I think this makes it clearer.


"duane" wrote:

try this (for data in rows 1:100) (with assumed result of zero fo no
occurances)

=if(sumproduct((a1:a100=1)*(b1:b100=2))0,1,0)

=if(sumproduct((c1:c100=10)*(c1:c100<=20)*(b1:b10 0=1))0,1,0)

"docnige" wrote:

I have a table with values 1 and 2 in column B and I wish to know what the
results in columns B to X are based on this i.e If column A equals 1 and
column B equals 1 then I want to return a count of 1. And so on: if column A
equals 1 and column B equals 2 then return a count of 1. Can I also do this
for ranges if column C equals 10-20 and column B equals 1 then return a count
of 1. I have tried SUMIF, AND and IF in the Help but can't understand how to
the above?

Thanks for the help.

  #5   Report Post  
Posted to microsoft.public.excel.misc
docnige
 
Posts: n/a
Default IF AND formulas

Excellent, I think that works but to be sure I need to include the option of
a blank cell in column A as well so if column A is blank and column F is 1
then I need a formula for those occurences too?

"duane" wrote:

try thi 9for rows 1:100 - adjust row range needed

=sumproduct((a1:a100=1)*(b1:b100=2))

adds occurances for 1 in column a and 2 in column b

=sumproduct((c1:c100=10)*(c1:c100<=20)*(b1:b100=1 ))

adds occurances for 10-20 in column c and 1 in column b


"docnige" wrote:

That is a start but it only returns the value 1, I want it to add all
occurences in the table where column B for example equals 1 and column F
equals 1 etc. So

Column B Column F
1 1
1 2
1 1
2 1

In this example the formula would return 2 for the above example.

I think this makes it clearer.


"duane" wrote:

try this (for data in rows 1:100) (with assumed result of zero fo no
occurances)

=if(sumproduct((a1:a100=1)*(b1:b100=2))0,1,0)

=if(sumproduct((c1:c100=10)*(c1:c100<=20)*(b1:b10 0=1))0,1,0)

"docnige" wrote:

I have a table with values 1 and 2 in column B and I wish to know what the
results in columns B to X are based on this i.e If column A equals 1 and
column B equals 1 then I want to return a count of 1. And so on: if column A
equals 1 and column B equals 2 then return a count of 1. Can I also do this
for ranges if column C equals 10-20 and column B equals 1 then return a count
of 1. I have tried SUMIF, AND and IF in the Help but can't understand how to
the above?

Thanks for the help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change column letters to correct ones in many formulas automatically? Dmitry Kopnichev Links and Linking in Excel 7 October 13th 05 10:52 PM
how can i get formulas in excel to copy and paste? bman Excel Worksheet Functions 1 October 3rd 05 05:15 PM
How to make Excel run limited number of formulas on a given worksh John Excel Discussion (Misc queries) 0 January 12th 05 05:29 PM
Way to make Excel only run certain formulas on a worksheet? jrusso Excel Discussion (Misc queries) 0 January 12th 05 05:23 PM
calculating formulas for all workbooks in a folder Chad Excel Worksheet Functions 3 November 13th 04 06:22 PM


All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"