+ Reply to Thread
Results 1 to 5 of 5

How to return multiple values in multiple cells if argument is TRUE in IF functions?

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Mars
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to return multiple values in multiple cells if argument is TRUE in IF functions?

    I want my IF function to populate two cells with two values if argument for IF function is found TRUE. Is it possible?

    IF(logical_test, [value_if_true], [value_if_false])

    value_if_true = return multiple values in mutiple cells (for example put number 8 in cell A2 and number 10 in cell A3 if function is TRUE)

    How would I do that? I tried putting IF(logical_test, (A2="8",A3="10"), [value_if_false]) but it is not possbile...

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to return multiple values in multiple cells if argument is TRUE in IF functions?

    hi WalkTalk, there's no way to do that in formulas. but couldnt you split them up in A2 & A3? in A2:
    =IF(logical_test, 8, [value_if_false])

    in A3:
    =IF(logical_test, 10, [value_if_false])

    might be possible in VBA though if you somehow cant use this

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to return multiple values in multiple cells if argument is TRUE in IF functions?

    ---Duplicate Post----

  4. #4
    Registered User
    Join Date
    09-26-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to return multiple values in multiple cells if argument is TRUE in IF functions?

    As benishiryo says - why not split the formula into both cells?

    You can have both cells perform the IF function, and if you want the cells to be blank otherwise place a "" where false, I.E.:

    =IF(logical_test, value_you_want,"")

  5. #5
    Registered User
    Join Date
    01-08-2013
    Location
    Mars
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to return multiple values in multiple cells if argument is TRUE in IF functions?

    Quote Originally Posted by benishiryo View Post
    hi WalkTalk, there's no way to do that in formulas. but couldnt you split them up in A2 & A3? in A2:
    =IF(logical_test, 8, [value_if_false])

    in A3:
    =IF(logical_test, 10, [value_if_false])

    might be possible in VBA though if you somehow cant use this
    Hey benishiryo!

    I already had two formulas in A2 and A3 like you suggested above so that is my main reason to open this thread and ask Excel gurus if there is any possibility to make only one formula.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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