M
mhoffmeier
I have a lengthy sumproduct that relies in part on the following test:
=SUMPRODUCT(--('Standard cost codes'!$E$2:$E$473=E124))
'Standard cost codes'!$E$2:$E$473 is a list of cost code descriptions
in text.
E124 is where the descriptions are filled out on another sheet.
When E124 contains a value in the range 'Standard cost codes'!$E$2:$E
$473, it works just fine, evaluating the appropriate cell in 'Standard
cost codes'!$E$2:$E$473 as 1, the others as 0.
If E124 is blank, however, it evaluates all the cells in 'Standard
cost codes'!$E$2:$E$473 as 1. Rather than returning FALSE, and a
multiplier of zero, since there are no blank cells, it provides TRUE,
and a mulitplier of one for all cells, returning 472 when standing
alone as shown above.
I've worked around this with an if(isblank(E124),"",....., but I don't
understand why excel thinks a blank cell equals cells that have text
in them.
Any ideas what I've got wrong here?
=SUMPRODUCT(--('Standard cost codes'!$E$2:$E$473=E124))
'Standard cost codes'!$E$2:$E$473 is a list of cost code descriptions
in text.
E124 is where the descriptions are filled out on another sheet.
When E124 contains a value in the range 'Standard cost codes'!$E$2:$E
$473, it works just fine, evaluating the appropriate cell in 'Standard
cost codes'!$E$2:$E$473 as 1, the others as 0.
If E124 is blank, however, it evaluates all the cells in 'Standard
cost codes'!$E$2:$E$473 as 1. Rather than returning FALSE, and a
multiplier of zero, since there are no blank cells, it provides TRUE,
and a mulitplier of one for all cells, returning 472 when standing
alone as shown above.
I've worked around this with an if(isblank(E124),"",....., but I don't
understand why excel thinks a blank cell equals cells that have text
in them.
Any ideas what I've got wrong here?