Help need with IF statement!!

  • Thread starter Thread starter TBFA
  • Start date Start date
T

TBFA

I need to combine these small if statements into one long if statemen
can anyone please help?

=IF(A17=(1,"Arsenal")
=IF(A17=(2,"Aston Villa")
=IF(A17=(3,"Birmingham City")
=IF(A17=(4,"Blackburn Rovers")
=IF(A17=(5,"Bolton Wanderers")
=IF(A17=(6,"Charlton Athletic")
=IF(A17=(7,"Chelsea")
=IF(A17=(8,"Everton")
=IF(A17=(9,"Fulham")
=IF(A17=(10,"Leeds United")
=IF(A17=(11,"Leicester City")
=IF(A17=(12,"Liverpool")
=IF(A17=(13,"Manchester City")
=IF(A17=(14,"Manchester United")
=IF(A17=(15,"Middlesbrough")
=IF(A17=(16,"Newcastle United")
=IF(A17=(17,"Portsmouth")
=IF(A17=(18,"Southampton")
=IF(A17=(19,"Tottenham Hotspur")
=IF(A17=(20,"Wolverhampton Wanderers")

Thanks a lot!
 
well, you can use CHOOSE;

CHOOSE(A17,"Aresenal","Aston Villa")

et. cetera; so if A17 has 1, it will be "Arsenal", and so on. If A17 is 200,
it will give an error statement since you don't have 200 things to choose
from.
 
Try the Choose function:

=CHOOSE(A17,"Arsenal","Aston Villa","Birmingham City","Blackburn
Rovers","Bolton Wanderers","Charlton
Athletic","Chelsea","Everton","Fulham","Leeds United","Leicester
City","Liverpool","Manchester City","Manchester
United","Middlesbrough","Newcastle
United","Portsmouth","Southampton","Tottenham Hotspur","Wolverhampton
Wanderers")

.... and go Liverpool!
 
thanks very much for the feedback!!

Charles your idea work perfectly thankyou so much!
thanks also dave even though it's not quite what i wanted.
 
You're welcome, though mine and Charles' responses are the same, except I
wasn't going to put ALL those football teams in there as Charles so nicely
did-- I only put 2 of them, and explained when it would fail. From this,
some people would see the pattern and understand what choose does and feel
good about applying something they've learned. Others just want the answer.
No problem.
 
LOL - I was wondering just how they differed????? - Figured it was my eyesight
:-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



Dave R. said:
You're welcome, though mine and Charles' responses are the same, except I
wasn't going to put ALL those football teams in there as Charles so nicely
did-- I only put 2 of them, and explained when it would fail. From this,
some people would see the pattern and understand what choose does and feel
good about applying something they've learned. Others just want the answer.
No problem.
 
Back
Top