Hello,
I have been wrestling with this for the past several hours and hope that someone can help. It is driving me crazy--I am obsessed.
I have a large data set from which data must be selected and crunched based upon an elaborate set of conditions. There are multiple conditions that change depending upon what I am interested in and rather than bury a million of them in various formulas throughout the workbook I want to locate them in cells so they are easy to change.
Here is an example of one of the simpler conditional calculation formulas I am talking about:
{=COUNT(IF((site=subject)*(((pre="X")*(pri="X")*(pol="X"))+((pri="A")*(sloc="B")))*(pcode=TEXT(A12,"0")),result,"X"))}
Here is a simplified example for the purpose of posing my question:
Long formula:
{=COUNT(IF(site=subject,result,"X"))}
where site and result are columns in a database and subject is a single cell named range. This formula works when entered and correctly gives me the number of results for which the corresponding site is the same as the subject.
What I am trying to do":
{=COUNT(IF(condition,result,"X"))}
where result is the same as above but condition is a single cell named range containing the string "site=subject". This formula returns "0".
There must be a way to do this or otherwise avoid having the hard-wire data selection conditions within each and every formula.
Thanks,
Scott
Bookmarks