View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CraigSA
 
Posts: n/a
Default vlookup vs. if, help needed

No there are only 3 combinations for each row (TFF, FTF, FFT) only one of the
three can be true because each row is linked to a group of option buttons.
so thats 3^5 right?

Anyway, I'm using the data to give results of Hepatitis B virus testing. so
colunm a is "Positive", b is "Negative", c is "No result". and there are 5
different tests. Now for each combination of test results there is a
different diagnosis.
Say if all the tests are negative then result is "Non-infectious". but if a1
is positive then there could be a number of different outcomes depending on
the results of other tests.

I was thinking of using vlookup with a reference table so that the outcome
for one set would look like: eg. TFF,FTF,TFF,TFF,FFT ;
and then my result would be something like: Chronic precore infection ;

I was just wondering if there would be a better way of getting results
because doing things this way will force me to make a lookup table thats 100+
rows long and this could get confusing, with each entry consisting of a
combination of 15 T/F states and it would take time to set this up.

I can use a few if statements in between for don't care combinations like:
if(and(a1,b1),"my result","vlookup(....)")
because if these 2 are positive it doesn't matter what the other three test
results are.

Is ther a way to ake the vlookup input an array istead of using &? so i
would have
vlookup(a1:c5,lookup table,2,0)
instead of
vlookup(a1&b1&c1&a2&b2&c2&a3&b3&c3&a4&b4&c4&a5&b5& c5, ..... )
When i try this I get #value.

Or is there another formula i can use to make the whole process easier?
Hope that clears things up a bit.



"Duke Carey" wrote:

Seems more that you have (2^3)=8 possible combinations for each row * 5 rows,
or 8^5 combinations = 32,768 combinations.

So..how are you trying to summarize/use this data?