+ Reply to Thread
Results 1 to 6 of 6

Multiple IFs returning errors

  1. #1
    Registered User
    Join Date
    07-18-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Multiple IFs returning errors

    Hello all,

    I have a list of URLs with them all ending either .co.uk .com or .co and each has a different value associated with it. So I need a list next to it that returns the value based on whether it is .co.uk .com or .co

    I came up with this:
    =IF(FIND(RIGHT("uk",2),B7),"1.99",(IF(FIND(RIGHT("com",3),B7),"2.99",(IF(FIND(RIGHT("co",2),B7),"3.99",FALSE)))))

    It works for the .co.uk URLs but then returns #VALUE! for the others.

    Any suggestions?

    Thanks in advance :-)

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Multiple IFs returning errors

    Embed the all the FIND functions in the ISNUMBER function like
    Please Login or Register  to view this content.
    Also note that FIND is case sensitive there where SEARCH is not

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Multiple IFs returning errors

    Try it like this:

    =IF(RIGHT(B7,2)="uk",1.99,IF(RIGHT(B7,3)="com",2.99,IF(RIGHT(B7,2)="co",3.99,FALSE)))

    Hope this helps.

    Pete

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Multiple IFs returning errors

    You're using the RIGHT() function incorrectly

    If the value is in A2

    =IF(RIGHT(A2,2)="uk",1.99,IF(RIGHT(A2,3)="com",2.99,IF(RIGHT(A2,2)="co",3.99,FALSE)))

    Note that the quotes have been removed from the 1.99, 2.99 and 3.99.
    Put them back in if you want text results instead of numeric

  5. #5
    Registered User
    Join Date
    07-18-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Multiple IFs returning errors

    Thanks that worked! Cheers mate :-)

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Multiple IFs returning errors

    @ matthewread88

    Forgot to say, "Welcome to the forum".

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself.
    Thanks.

+ 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