+ Reply to Thread
Results 1 to 7 of 7

Using if statements to return value

  1. #1
    Registered User
    Join Date
    10-24-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    13

    Using if statements to return value

    I, am trying to use If statements to return the value in O2 but if its blank to return the value in M2, then if M2 is blank return K2, if K2 is Blank then return I2, then if I2 is Blank return G2, then finally if G2 is Blank Return E2.

    What ive got so far is =IF(O2="",M2,IF(M2="",K2,IF(K2="",I2,IF(I2="",G2,IF(G2="",E2,E2))))) but this didn’t work.


    ive not had any training in Excel and most of what i do I’ve learned from trial and error and google. however i have no joined the forum because I’m not even sure what to search for to find an answer for this.

    Any help would be greatly Appreciated

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: Using if statements to return value

    seems to work ok for me
    but you have E2 for if G2 is blank
    and if all are flse you also return E2
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Using if statements to return value

    Focus on what is not blank instead of what is blank, and it is easier to think about.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Using if statements to return value

    Hi & welcome to the board.
    How about
    =IF(O2<>"",O2,IF(M2<>"",M2,IF(K2<>"",K2)))
    simply add the remaining criteria

    Beaten 2it

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Using if statements to return value

    Please try
    =IF(O2="",IF(M2="",IF(K2="",IF(I2="",IF(G2="",IF(E2="","",E2),G2),I2),K2),M2),O2)

    or
    =LOOKUP(2,1/(E2:O2<>"")/MOD(COLUMNS(E2:O2),2),E2:O2)

  6. #6
    Registered User
    Join Date
    10-24-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    13

    Re: Using if statements to return value

    Thank you all very much all these solutions worked for me!

    and i have a much better idea of where i was going wrong too!

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Using if statements to return value

    Glad we could help & thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula return statements on multiple criteria
    By welshman010 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2014, 08:34 PM
  2. [SOLVED] Nested IF statements to FIND text string and return set values.
    By stuartm4h in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-12-2013, 12:03 PM
  3. [SOLVED] If formula not going through all if statements to return correct value
    By Wanna be excel wiz in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-31-2013, 01:43 AM
  4. Multiple true statements with a return value
    By Cameleon80 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-27-2012, 09:16 AM
  5. Replies: 3
    Last Post: 09-08-2011, 02:40 AM
  6. Counting Cells with If Statements that Return Text
    By corrado33 in forum Excel General
    Replies: 6
    Last Post: 10-22-2010, 09:11 PM
  7. [SOLVED] How do I nest IF statements to only return value if both true?
    By kvnexcel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-14-2006, 01:40 PM

Tags for this Thread

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