+ Reply to Thread
Results 1 to 7 of 7

IF formula not working correctly

  1. #1
    Registered User
    Join Date
    06-18-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    6

    Question IF formula not working correctly

    I'm trying to determine whether or not an office is billing enough for their services so I've created a column that shows me the difference between what they've billed and what they are "allowed" to bill. However, I am missing some information, so, if the variance column is blank I want the formula to come back with "Unknown", but it's not, it's coming back with Exceeds. My formula is below. Am I doing something wrong? I'm feeling really stupid right about now.

    =IF(CQ4>0,"Exceeds",IF(CQ4=0,"Equals",IF(CP4="","Unknown",IF(CQ4<0,"Below","Not Found"))))

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: IF formula not working correctly

    Do you have a sample of your data that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: IF formula not working correctly

    Best you post a sample workbook.
    Your formula is difficult to follow without one

    You could try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You seem to be refering to two cells, only you can say which one takes priority.

    Nested IF()s stop at the first true condition found.

    "Not Found" looks to be impossible to exist.
    Last edited by Marcol; 06-18-2013 at 02:59 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    06-18-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: IF formula not working correctly

    that's a typo. Sorry. All the cells are CQ4. *headdesk*

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: IF formula not working correctly

    =IF(CQ4="","Unknown",IF(CQ4>0,"Exceeds",IF(CQ4=0,"Equals",IF(CQ4<0,"Below","Not Found"))))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: IF formula not working correctly

    Okay so does this work?
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    [EDIT]
    This seems to do what you want,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If so please mark your thread [SOLVED]

    How do you expect to get "Not found" ?
    Last edited by Marcol; 06-18-2013 at 03:20 PM. Reason: Added a further possibility and question

  7. #7
    Registered User
    Join Date
    06-18-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: IF formula not working correctly

    This worked! Thank you very much.

+ 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