+ Reply to Thread
Results 1 to 5 of 5

Getting #NAME? Error when attempting to do nested IF statements

  1. #1
    Registered User
    Join Date
    06-30-2021
    Location
    Texas, US
    MS-Off Ver
    Office16
    Posts
    3

    Exclamation Getting #NAME? Error when attempting to do nested IF statements

    Hi All-

    I'm trying to use an IF statement to return a specific base fee amount based on a currency code. The IF statement I'm using is =IF(H2=USD,"30.00",IF(H2=CAD,"54.00",IF(H2=AUD,"35.00",IF(H2=BRL,"66.00",IF(H2=INR,"319.00",IF(H2=JPY,"3300.00",IF(H2=KRW,"34590.00",IF(H2=MYR,"98.00",IF(H2=SGD,"31.00",IF(H2=TWD,"999.00","FALSE"))))))))))

    Where H2 is where the currency code is. I'm unfortunately only receiving the error #NAME? which I can't figure out why. Can anyone help me out with this please?

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

    Re: Getting #NAME? Error when attempting to do nested IF statements

    Welcome to the forum.

    Syntax:

    =IF(H2="USD","30.00", etc.

    To make the numbers real numbers and not text:

    =IF(H2="USD",30.00, etc.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-30-2021
    Location
    Texas, US
    MS-Off Ver
    Office16
    Posts
    3

    Re: Getting #NAME? Error when attempting to do nested IF statements

    You are amazing, thank you so much! I LOVE this forum!

    -Danielle

  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
    48,523

    Re: Getting #NAME? Error when attempting to do nested IF statements

    With that many IF statements, you would be better off using VLOOKUP and a lookup table. Much easier to maintain.
    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


  5. #5
    Registered User
    Join Date
    06-30-2021
    Location
    Texas, US
    MS-Off Ver
    Office16
    Posts
    3

    Re: Getting #NAME? Error when attempting to do nested IF statements

    I thought about doing that but preferred to take this route for some company specific reasons. Thank you, though.

+ 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. Nested If/Match Statements coming up with Error
    By briankwilson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2020, 02:34 AM
  2. Select Case Error with Nested If Statements
    By Garrigan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-09-2016, 03:25 AM
  3. "Large" Function w. Nested If Statements Error
    By thecartyparty1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-15-2015, 07:22 PM
  4. [SOLVED] Nested IF statements are returning FALSE values - cannot find error in code!
    By apex_chio in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-03-2013, 11:01 PM
  5. Nested For Loop + If Statements Error
    By cinarbe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2012, 10:41 AM
  6. Error using nested IF statements
    By KTWoo in forum Excel General
    Replies: 5
    Last Post: 12-20-2011, 06:10 PM
  7. Replies: 12
    Last Post: 05-15-2009, 08:38 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