+ Reply to Thread
Results 1 to 7 of 7

IF Formula error

  1. #1
    Registered User
    Join Date
    12-23-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    37

    IF Formula error

    Could someone tell me where I'm going wrong with this formula please? If the condition of "Green" is met in either or both cells, I want it to pull through & add the numbers in adjacent cells (B20, B69 and B78). If the condition "Green" is not met in either cell, I want it to remain blank. However I am getting the VALUE error. It works fine with zero but not "". Can anyone help please?

    =IF(B48="Green",B20)+IF(B54="Green",(B69+B78),"")

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: IF Formula error

    Maybe this?
    =if(or(b48="green",b54="green"),sum(B20, B69, B78),"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-23-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    37

    Re: IF Formula error

    Thanks for your reply FDibbins, although this formula appears to pull through all 3 cells even if just one of the conditions "Green" is met. I need it to pull through only the cell or cells that correspond to that particular "Green" (B20 for one, B69 and B78 for the other) and for them to be 'independent' of each other if that makes sense.

    Thanks

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: IF Formula error

    Your request was...
    If the condition of "Green" is met in either or both cells,
    It would probably be better if you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  5. #5
    Registered User
    Join Date
    12-23-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    37

    Re: IF Formula error

    I have attached a very simple version of what I see is the four outcomes depending upon entering "Green" in either of the cells.
    Outcome 1 - neither cell includes "Green" so the "Total for Green" collection cell remains empty.
    Outcome 2 - "Green" is entered in the first cell so the figure (£100) is pulled through to the collection.
    Outcome 3 - "Green" is entered in the second cell so the figures (£100 + £150) are pulled through to the collection.
    Outcome 4 - "Green" is entered in both the first & second cell so the figures (£100 + £100 + £150) are pulled through to the collection.

    I need a formula that will allow me to have any of these 4 different scenarios. I have managed to do it where I can get a zero as the result in outcome 1, but not blank.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,057

    Re: IF Formula error

    How about:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Edited because I missed the blank criteria.
    Last edited by Arkadi; 09-21-2018 at 09:08 AM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  7. #7
    Registered User
    Join Date
    12-23-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    37

    Re: IF Formula error

    Thanks very much, that's solved it.

+ 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. [SOLVED] Macro To IGNORE ERROR - Cell With Formula / Green Arrow Error
    By Logit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2018, 09:16 PM
  2. [SOLVED] FORMULA Remove #NUM error not using IFERROR OR IS ERROR
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-03-2017, 04:22 PM
  3. Formula error or data link error
    By sctr in forum Excel General
    Replies: 4
    Last Post: 09-19-2016, 09:15 AM
  4. [SOLVED] Inputbox error message. Formula you typed contains an error.
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-09-2013, 02:25 PM
  5. Excel 2007 : Formula error:bring up an #VALUE! Error.
    By burner007 in forum Excel General
    Replies: 3
    Last Post: 06-20-2011, 06:10 AM
  6. Replies: 4
    Last Post: 03-24-2006, 07:20 AM
  7. Error values:DIV/0! error in SumProduct formula with no division
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM

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