Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNTIF or SUMIF or ??
I have a spreadsheet with three columns of data. The first column is labeled "Male", the second is labeled "Female" and the third is "Age". Each row in the sheet corresponds to a caller. So if the caller was a female, we marked a '1' under female and then under 'Age' put the numeric age of the caller. What I am trying to do is determine the age ranges of the callers. So what I need is a function that will count/sum or whatever rows C4:C81 IF the value of the cell is greater than or equal to 30 AND less than 40. It seems COUNTIF can't except multiple ranges and in doing SUMIFs, my answer is always '1' or '0'. It seems to be summing each cell, not the range. Please help! Thanks! -- croakingtoad ------------------------------------------------------------------------ croakingtoad's Profile: http://www.excelforum.com/member.php...o&userid=29152 View this thread: http://www.excelforum.com/showthread...hreadid=488728 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNTIF or SUMIF or ??
=COUNTIF(C4:C81,"=30")-COUNTIF(C4:C81,"=40")
or =SUMPRODUCT(--(C4:C81=30),--(C4:C81<40)) -- Regards, Peo Sjoblom "croakingtoad" wrote in message ... I have a spreadsheet with three columns of data. The first column is labeled "Male", the second is labeled "Female" and the third is "Age". Each row in the sheet corresponds to a caller. So if the caller was a female, we marked a '1' under female and then under 'Age' put the numeric age of the caller. What I am trying to do is determine the age ranges of the callers. So what I need is a function that will count/sum or whatever rows C4:C81 IF the value of the cell is greater than or equal to 30 AND less than 40. It seems COUNTIF can't except multiple ranges and in doing SUMIFs, my answer is always '1' or '0'. It seems to be summing each cell, not the range. Please help! Thanks! -- croakingtoad ------------------------------------------------------------------------ croakingtoad's Profile: http://www.excelforum.com/member.php...o&userid=29152 View this thread: http://www.excelforum.com/showthread...hreadid=488728 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNTIF or SUMIF or ??
Countif cannot, by itself, take a range. But if you count the 30+ and
subtract the 40+, you've created the range: =countif(c4:c81,"=30")-countif(c4:c81,"=40"). Sumif cannot, by itself, take a range either. But the idea above applies. But I'm not sure what you've got that would be added up? The ages? If so, then the third argument of the sumif function should point to the age column, not the Male/Femail columns. What's the formula you've used? --Bruce "croakingtoad" wrote: I have a spreadsheet with three columns of data. The first column is labeled "Male", the second is labeled "Female" and the third is "Age". Each row in the sheet corresponds to a caller. So if the caller was a female, we marked a '1' under female and then under 'Age' put the numeric age of the caller. What I am trying to do is determine the age ranges of the callers. So what I need is a function that will count/sum or whatever rows C4:C81 IF the value of the cell is greater than or equal to 30 AND less than 40. It seems COUNTIF can't except multiple ranges and in doing SUMIFs, my answer is always '1' or '0'. It seems to be summing each cell, not the range. Please help! Thanks! -- croakingtoad ------------------------------------------------------------------------ croakingtoad's Profile: http://www.excelforum.com/member.php...o&userid=29152 View this thread: http://www.excelforum.com/showthread...hreadid=488728 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Forget SUMIF, COUNTIF and VLOOKUP | Excel Worksheet Functions | |||
problems with sumif and countif | Excel Discussion (Misc queries) | |||
Reference Cells with Sumif or Countif | New Users to Excel | |||
Modify SUMIF and COUNTIF to work with SUBTOTALS | Excel Worksheet Functions | |||
Countif, Sumif, If - help! | Excel Worksheet Functions |