Thread: IF Dilema
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default IF Dilema

On Sun, 24 Dec 2006 07:23:00 -0800, Shu of AZ
wrote:

My dilema is that in the same statement you read below, I have to also ask
also if T27.4 and dg193=1,2,3,4,or 5, but that would be too many IF
statements. Any ideas on how to reduce this statement?


=IF(AND(DG192=1,T2<7.5),C3,IF(AND(DG192=2,T2<7.5) ,C4,IF(AND(DG192=3,T2<7.5),C5,IF(AND(DG192=4,T2<7. 5),C6,IF(AND(DG192=5,T2<7.5),C7)))))



There are a number of different ways of solving this problem. They vary in
complexity depending on the complexity you require.

Here's one way, given your parameters:

=IF(T2<7.5,CHOOSE(DG192,C3,C4,C5,C6,C7),
CHOOSE(DG192,D3,D4,D5,D6,D7))

You could also set up lookup tables.
--ron