+ Reply to Thread
Results 1 to 9 of 9

Excel formula for IF function

  1. #1
    Registered User
    Join Date
    07-19-2018
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Office 2013
    Posts
    3

    Excel formula for IF function

    I have been trying to create an IF formula to solve the following problem bu without success:

    I want to display the different monetary values of a range of medical tariff codes, that a user would enter.
    So, tariff code 84200 has a value of R200 (ZAR)
    Tariff code 84201 has a value of R225.
    Tarrif code 84202, a value of R250 and so on.
    The money value increment is R25 for the codes starting at R200 for 84200 through to 84211.

    What is the structure of the formula to display the Rand value when a code is entered?

    Thanks
    Hennie

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Excel formula for IF function

    Do the tariff codes ever jump more than one?

    EDIT: since BSB came up with one, here is one I was playing with...
    it assumes that A1 has 84200 and B1 has R200
    and A2 is 84201 so this is in B2 dragged down...

    ="R"&IF(A2-A1=1,MID(B1,2,99)*1+25,B1)
    Last edited by Sam Capricci; 07-19-2018 at 04:21 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Excel formula for IF function

    If your code was in A1 and stored as a number, you could use the below:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I'm sure there are many ways of accomplishing the same result.

    BSB

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Excel formula for IF function

    If your codes are 84200 to 84211 in increments of 25 then you do not need an if function

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Where A1 is your code.


    If in the future you decide to use variable increments then

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


    Which uses the following table

    84200 200
    84201 227
    84202 255
    84203 284
    84204 314
    84205 345
    84206 377
    84207 410
    84208 444
    84209 479
    84210 515
    84211 552
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Registered User
    Join Date
    07-19-2018
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: Excel formula for IF function

    No they dont. they start at 200 and increase by one to 211

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Excel formula for IF function

    then almost anything given you ought to work, mine puts the R back in it, the others may not.

  7. #7
    Registered User
    Join Date
    07-19-2018
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: Excel formula for IF function

    BadlyspelledBouy

    Since the medical aid companies determine the tariff value, would your response be any different if the rand value increase was NOT a consistent R25?
    EG 84200 is R200
    84201 is R256
    84202 is R289.75 etc The rand values are always valid for one year. they change every January

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Excel formula for IF function

    If that is the case then I'd use a lookup table approach.

    That will make it far easier to update when the tariffs change.

    See attached. Formula in the yellow cell. Change the values in the green cells when the tariffs change.

    You could use a =LOOKUP() formula to achieve the same without the list, but that way you'd have to update all the formulas each time rather than just the green cells.

    BSB
    Attached Files Attached Files

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Excel formula for IF function

    did you try the one I gave you in post #2?

+ 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. Excel Formula or Function
    By rajuanand in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-08-2016, 02:19 AM
  2. What is the excel function for this formula?
    By lolyayman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2014, 01:27 AM
  3. Replies: 1
    Last Post: 02-06-2014, 09:22 AM
  4. Excel formula using IF function
    By Dhorsley in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-01-2013, 12:07 PM
  5. Excel Formula or Function Help Please
    By mystworlds in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 04-25-2013, 06:34 AM
  6. Need Excel formula in Macro using Subtotal formula with If function
    By mbnewton1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2013, 03:00 PM
  7. Excel formula - If function (maybe?)
    By bluewolf815 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2012, 05:02 PM

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