Consulting

Results 1 to 6 of 6

Thread: Solved: IF...Then...Else

  1. #1

    Talking Solved: IF...Then...Else

    Hi all

    I have the following formula in one cell that is repeated over a complete worksheet (from Current!G15.......to G97 and so on)

    =IF($B$9=1,Current!G15,IF($B$9=2,Current!H15,IF($B$9=3,Current!I15,IF($B$9= 4,Current!J15,IF($B$9=5,Current!K15,IF($B$9=6,Current!L15,,IF($B$9=7,Curren t!M15,IF($B$9=8,Current!N15,IF($B$9=9,Current!O15,IF($B$9=10,Current!P15,IF ($B$9=11,Current!Q15,IF($B$9=12,Current!R15,IF($B$9=13,Current!S15,IF($B$9= 14,Current!T15,IF($B$9=15,Current!U15,IF($B$9=16,Current!V15,IF($B$9=17,Cur rent!W15,IF($B$9=18,Current!X15,IF($B$9=19,Current!Y15,Current!Z15))))))))) ))))))))))

    but have the problem that Excel only allows 7 IF Statements per cell can anyone help me on this, I would be very grateful.
    Last edited by OhGorgeous1; 02-25-2009 at 09:11 AM.

  2. #2
    VBAX Tutor nst1107's Avatar
    Joined
    Nov 2008
    Location
    Monticello
    Posts
    245
    Location
    Try splitting the formula into more than one cell.

  3. #3
    VBAX Tutor david000's Avatar
    Joined
    Mar 2007
    Location
    Chicago
    Posts
    276
    Location
    http://www.cpearson.com/excel/nested.htm

    Here is a link with some good work-a-rounds.
    "To a man with a hammer everything looks like a nail." - Mark Twain

  4. #4
    Quote Originally Posted by david000
    http://www.cpearson.com/excel/nested.htm

    Here is a link with some good work-a-rounds.
    thanks for this david000 I will let you know how I get on, it will take a little while to put in place before I can test.

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =INDEX(Current!G15:Z15,1,B$9)
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    Quote Originally Posted by xld
    =INDEX(Current!G15:Z15,1,B$9)
    As always XLD you are the man! Many thanks that works a dream.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •