+ Reply to Thread
Results 1 to 8 of 8

Problem with =IF formula <<

  1. #1
    Registered User
    Join Date
    12-12-2023
    Location
    England
    MS-Off Ver
    2007
    Posts
    3

    Problem with =IF formula <<

    Hello everyone,
    I am a new member here.

    72-years-old. Don't use my laptop much, hence I still have Office 2007.
    However, I decided to try and study Excel, to exercise my mind, and have fun.

    So I hope you can find time to help me with this problem.
    my existing test set-up, which works just fine ...

    B1 - contains a random 4 digit number (eg: 1999)
    B2 - contains the last 2 digits of this number (eg: 99) using =RIGHT(B1,2)
    B3 - contains the contents of B2, minus 84 using =IF(B2>90,B2-84,"")

    this is where my problem begins ...
    I tried to modify the existing formula in B3

    from
    =IF(B2>90,B2-84,"")

    to
    =IF(B2<60, "F", IF(B2<70, "C", IF(B2<80, "B", IF(B2<100, "A"))))

    CONS: FALSE statement ... it doesn't work, because I think that although the contents of B2 is a number, the cell contains a formula?
    However, it worked just fine with the previous formula ... ?

    PROS: it does work if I remove the formula =RIGHT(B1,2) from cell B2 and just enter a number manually in that cell


    Is there a way to overcome this issue, please?
    Any help will be much appreciated.

    Thank you
    Geoffrey
    Attached Files Attached Files
    Last edited by geoff.s; 12-13-2023 at 07:37 AM. Reason: adding an Excel workbook

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,948

    Re: Problem with =IF formula <<

    Welcome to the forum.

    Hard to tell without seeing a sample.

    Are you really using Excel 2007?

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,948

    Re: Problem with =IF formula <<

    A guess whilst waiting for a sample workbook:

    =LOOKUP(--B2,{0,60,70,80},{"F","C","B","A"})

    I am not convinced that you have set the criteria correctly, though ...

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,210

    Re: Problem with =IF formula <<

    in B2

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


    converts TEXT to NUMERIC

    then your formula will work
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Registered User
    Join Date
    12-12-2023
    Location
    England
    MS-Off Ver
    2007
    Posts
    3

    Re: Problem with =IF formula <<

    Thank you John ...
    works just fine!

    I have so much to learn, but Excel is intriguing.

    Thanks so much,
    Geoffrey

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,948

    Re: Problem with =IF formula <<

    What about the solution I offered? That should work, too.

    =LOOKUP(--D2,{0,60,70,80},{"F","C","B","A"})

    Administrative Note

    Please don't ignore contributors to your thread - it takes members time to provide suggestions, so acknowledge all solutions offered, even if they don't meet your requirements. Thanks.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Attached Files Attached Files
    Last edited by AliGW; 12-13-2023 at 07:56 AM. Reason: Workbook added.

  7. #7
    Registered User
    Join Date
    12-12-2023
    Location
    England
    MS-Off Ver
    2007
    Posts
    3

    Re: Problem with =IF formula <<

    Issue solved - thank you so much to everyone with offer of help

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,948

    Re: Problem with =IF formula <<

    Please see post #6 for instructions about how to sign off this thread.

+ 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] Problem with formula - will not work when replacing section of one formula with another
    By Mike0713 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-04-2023, 01:27 PM
  2. [SOLVED] Problem with formula a counta formula
    By Longbow 44 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-28-2023, 11:11 AM
  3. [SOLVED] Vlookup Formula mixed with Sumproduct Formula Problem
    By djameshenry30 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2021, 04:52 AM
  4. Replies: 1
    Last Post: 01-06-2014, 03:54 AM
  5. Replies: 7
    Last Post: 02-03-2013, 06:25 PM
  6. Replies: 2
    Last Post: 01-22-2013, 07:09 AM
  7. Problem reading formula with ActiveCell.Formula
    By Matija in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2011, 06:10 AM

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