2000 Office SR-1 Excel - IF function

  • Thread starter Thread starter SolarMax
  • Start date Start date
S

SolarMax

This formulae pulls from a cell with that lists 6 options. When a
option is chosen, I want it to produce a result. It is giving me:

#VALUE!

The calculation I am using is this:

=IF(B37="IMPERIAL",0.5),IF(B37="FEUDAL - MILITARY",0.5),IF(B37="FEUDA

ECONOMIC",1),IF(B37="THEOCRACY",6),IF(B37="FEDERAL",2),IF(B37="COMMONWEALTH",3)

Thanks in advance
 
Hi
try the following
=IF(B37="IMPERIAL",0.5,IF(B37="FEUDAL - MILITARY",0.5,IF(B37="FEUDAL
ECONOMIC",1,IF(B37="THEOCRACY",6,IF(B37="FEDERAL",2,IF(B37="COMMONWEALT
H",3,""))))))

another option would be to create a separate lookup table and use
VLOOKUP to get your result. Lets say in column E you store your text
value (e.g. "IMPERIAL") and in column F your associated numerical value
(e.g. 0.5) try
=VLOOKUP(B37,$E$1:$F$6,2,0)
this gives you more flexibility (nested IF clauses have a maximum of 7)

HTH
Frank
 
Max,

Try this

=IF(OR(B37="IMPERIAL",B37="FEUDAL - MILITARY"),0.5,IF(B37="FEUDAL
ECONOMIC",1,IF(B37="THEOCRACY",6,IF(B37="FEDERAL",2,IF(B37="COMMONWEALTH",3,
"")))))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Frank, I cannot thank you enough. As with all things in life it is easy
when you know the answers and hell when you don't. Thanks again.

Sincerely,
Don
 
Back
Top