+ Reply to Thread
Results 1 to 4 of 4

IF formula to display "text" or do simple calculation if numbers present in cells

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    IF formula to display "text" or do simple calculation if numbers present in cells

    I need to perform a division calculation using cells 50 & 51 if numbers are present, otherwise display “NA” in the result cell if either of the above cell contains “ND”. The F & G cells are merged.
    Both of these formulas give a #VALUE! result in the cell below.

    =IF(COUNT(F50:G51)="ND", "NA", F50:G50/F51:G51)
    =IF(F50:G51="ND", "NA",F50/F51)

    F G
    50 112519
    51 ND
    52 #VALUE!


    Thanks!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: IF formula to display "text" or do simple calculation if numbers present in cells

    Try:

    =IF(COUNTIF(F50:G51,"ND"), "NA", F50/F51)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: IF formula to display "text" or do simple calculation if numbers present in cells

    Works! Thanks!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: IF formula to display "text" or do simple calculation if numbers present in cells

    Probably should be:

    =IF(COUNTIF(F50:F51,"ND"), "NA", F50/F51) since the cells are merged, you are really only looking at column F.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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