+ Reply to Thread
Results 1 to 4 of 4

Nested if formula

  1. #1
    Registered User
    Join Date
    12-10-2010
    Location
    Singapore
    MS-Off Ver
    MS Excel for Mac 2011
    Posts
    51

    Nested if formula

    I can't resolve what I thought to be a simple formula:

    Table
    situation 1: B 1 C 1 D 1 E 1
    situation 2: C 2 D 2 E 2
    situation 3: D 3 E 3
    situation 4: E 4
    situation 5: B 5 C 5 D 5
    situation 6: C 6 E 6
    situation 7: B 7

    What I want to obtain is: if B is empty, get C, if C is empty get D, if D is empty, get E
    I'm applying the following formula: =IF(B1<>"",B1,IF(C1<>"",D1,IF(D1<>"",E1)))

    result expected result
    situation 1: B 1 B 1
    situation 2: D 2 C 2
    situation 3: E 3 D 3
    situation 4: FALSE E 4
    situation 5: B 5 B 5
    situation 6: 0 C 6
    situation 7: B 7 B 7

    I hope someone can help me, thank you in advance,

    Gijs
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Nested if formula

    Change your formula to:

    =IF(B1<>"",B1,IF(C1<>"",C1,IF(D1<>"",D1,E1)))

  3. #3
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Nested if formula

    try:

    Please Login or Register  to view this content.
    or the fancier:

    Please Login or Register  to view this content.
    Last edited by icestationzbra; 05-28-2012 at 06:52 AM.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Nested if formula

    Or try:

    =LEFT(TRIM(B1&" "&C1&" "&D1&" "&E1),3)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1