+ Reply to Thread
Results 1 to 4 of 4

Trying to subtract from a cell that contains an IF statement.

  1. #1
    Registered User
    Join Date
    09-26-2012
    Location
    Boise, ID
    MS-Off Ver
    Excel 2007
    Posts
    2

    Unhappy Trying to subtract from a cell that contains an IF statement.

    Hey! I'm glad I was able to find this forum. It looks pretty active, so I'm sure there are some brainiacs that can help me with this!

    I have a cell that performs an if statement -> *=IF(B4="Good",AF7,IF(B4="Better",AG7,IF(B4="Best",AH7,)))

    It allows me to use a data validation menu (the Good, better, best) and (hopefully) change many different calculations in my worksheet.

    I'm trying to do simple math off that cell that looks at the if statement cell and multiplies it by a different cell. I keep getting a #Value! error. Is this not possible to do with a cell that contains an if statement?

    Also, I apologize if this has been discussed already! I can't seem to find it anywhere!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Trying to subtract from a cell that contains an IF statement.

    You have no value for the case where it is no Good, Better or Best ... what is in B4? Could there be any trailing spaces meaning there is no match? What's in cells AF7, AG7, and AH7.

    Use Evaluate Formula to see what is being calculated.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-26-2012
    Location
    Boise, ID
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Trying to subtract from a cell that contains an IF statement.

    Ahhh. I found it. The data in AF7, AG7, and AH7 is a table. The data there had trailing spaces and was not formatted correctly. Thanks for reminding me to look there! Simple fix. Thanks again.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Trying to subtract from a cell that contains an IF statement.

    You're welcome. Glad I could help.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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