Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I would like to use a formula like COUNTIF or SUMPRODUCT to test two ranges.
I want the formula to return the value of the number of cells that meet the two conditions. Both columns contain TEXT, not numbers. Like this: =COUNTIF(--(Sheet1!B:B, "Move-In"),--(Sheet1!E:E,"A1")) So if there are 10 Move-Ins with Type A1, then the value 10 would be calulated. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
If all the data is text, what do you mean by 'value of the number of cells'? Try this: =SUMPRODUCT(--(Sheet1!B1:B1000="Move-In"),--(Sheet1!E1:E1000 = "A1")) You cannot use full column ranges with SUMPRODUCT, and the ranges must be the same size. Andy. "lawoman35" wrote in message ... I would like to use a formula like COUNTIF or SUMPRODUCT to test two ranges. I want the formula to return the value of the number of cells that meet the two conditions. Both columns contain TEXT, not numbers. Like this: =COUNTIF(--(Sheet1!B:B, "Move-In"),--(Sheet1!E:E,"A1")) So if there are 10 Move-Ins with Type A1, then the value 10 would be calulated. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Andy. If I have 10 new residents or "Move-in"s and they all moved
into an "A1" unit type, then my formula should count them and return the number 10. I revised the formula and it returns zero. I just read in my Excel book that SUMPRODUCT treats nonnumeric entries as zero. I wonder if I should go a differnt route and use LOOKUP. "Andy" wrote: Hi If all the data is text, what do you mean by 'value of the number of cells'? Try this: =SUMPRODUCT(--(Sheet1!B1:B1000="Move-In"),--(Sheet1!E1:E1000 = "A1")) You cannot use full column ranges with SUMPRODUCT, and the ranges must be the same size. Andy. "lawoman35" wrote in message ... I would like to use a formula like COUNTIF or SUMPRODUCT to test two ranges. I want the formula to return the value of the number of cells that meet the two conditions. Both columns contain TEXT, not numbers. Like this: =COUNTIF(--(Sheet1!B:B, "Move-In"),--(Sheet1!E:E,"A1")) So if there are 10 Move-Ins with Type A1, then the value 10 would be calulated. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() I think the sumproduct formula posted above should have read: =SUMPRODUCT(--(Sheet1!B1:B1000="Move-In")*--(Sheet1!E1:E1000 = "A1")) Rgds Mike -- Mikeopolo ------------------------------------------------------------------------ Mikeopolo's Profile: http://www.excelforum.com/member.php...o&userid=18570 View this thread: http://www.excelforum.com/showthread...hreadid=525709 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I don't see anything wrong with the proferred formula. You might want to
recheck your data. For instance, for a test, I entered some dummy information in columns A and B and used the following formula and got the expected results: =SUMPRODUCT(--(A20:A31 = "Move-in"), --(B20:B31 = "A1")) Assuming that your data is where you indicated and there are no hidden spaces or funny characters, the formula should work. Try moving the parts of the formula you are checking for and making sure it truly matches with what is in your lookup range. In other words, copy the string Move-in directly from your formula into a cell and trying a formula like, if you copied Move-in to A1, =A1 = B25 (if B25 contains that string.) If it doesn't return true, check for trailing spaces or maybe you used -- rather than -. It probably isn't a formatting issue in this case, but if you were looking for a number and it was formatted as text, your lookup would almost certainly fail. -- Kevin Vaughn "lawoman35" wrote: Thanks Andy. If I have 10 new residents or "Move-in"s and they all moved into an "A1" unit type, then my formula should count them and return the number 10. I revised the formula and it returns zero. I just read in my Excel book that SUMPRODUCT treats nonnumeric entries as zero. I wonder if I should go a differnt route and use LOOKUP. "Andy" wrote: Hi If all the data is text, what do you mean by 'value of the number of cells'? Try this: =SUMPRODUCT(--(Sheet1!B1:B1000="Move-In"),--(Sheet1!E1:E1000 = "A1")) You cannot use full column ranges with SUMPRODUCT, and the ranges must be the same size. Andy. "lawoman35" wrote in message ... I would like to use a formula like COUNTIF or SUMPRODUCT to test two ranges. I want the formula to return the value of the number of cells that meet the two conditions. Both columns contain TEXT, not numbers. Like this: =COUNTIF(--(Sheet1!B:B, "Move-In"),--(Sheet1!E:E,"A1")) So if there are 10 Move-Ins with Type A1, then the value 10 would be calulated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Formula Auditing Bug ? (Excel 2003) | Excel Worksheet Functions | |||
EDIT FORMULA BAR in excel 2003? why not? where is it? | Excel Worksheet Functions | |||
Excel 2003 will not display color fonts or color fill cells | Excel Worksheet Functions | |||
count non blank cells which meet criteria in another column | Excel Worksheet Functions |