+ Reply to Thread
Results 1 to 13 of 13

Using IF function when you have more than 5 possible solutions

  1. #1
    Registered User
    Join Date
    04-20-2010
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2003
    Posts
    19

    Using IF function when you have more than 5 possible solutions

    I need a formula to calculate a % mark up. the mark up differs depending on the manufacturers selling price, and i need a formula that will take this into consideration. please see the attachment, hopefully that will make clear what i am trying to say.

    Thanks
    Attached Files Attached Files

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

    Re: Using IF function when you have more than 5 possible solutions

    in the table in column I, only input the lower bounds of each range

    e.g

    0
    6.07
    6.23
    12.12

    etc..

    then use formula:

    =LOOKUP(A2,$I$3:$J$12)

    copied down.
    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
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using IF function when you have more than 5 possible solutions

    Hi,

    See if the attached helps

    Regards
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    04-20-2010
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Using IF function when you have more than 5 possible solutions

    this is good, thanks, but i also need the calculation to add the mark up so if its a % i would normally insert A2*(1+B2) but if its in Euros then i would only need A2+B2

    how can i do this with the look up included? hope this makes sense!!

  5. #5
    Registered User
    Join Date
    04-20-2010
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Using IF function when you have more than 5 possible solutions

    i need it to automatically detect whether it is a currency or %

  6. #6
    Registered User
    Join Date
    04-20-2010
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Using IF function when you have more than 5 possible solutions

    richard, i think ur formula is correct but i cant get it to work in my spreadsheet - i have changed it so the cells are correct in the formula but i am getting #REF! any ideas on what im doing wrong?

    Thanks

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using IF function when you have more than 5 possible solutions

    Hi,

    Can you upload your workbook so that we can take a look.

    Regards

  8. #8
    Registered User
    Join Date
    04-20-2010
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Using IF function when you have more than 5 possible solutions

    Here is a sheet from my work book. i have added the %'s manually but need them to go in automatically as prices change!!

    Thank you
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-20-2010
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Using IF function when you have more than 5 possible solutions

    i need a formula for the "Pharmacy Mark Up of PPP" too. hope im not being to cheeky!!

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using IF function when you have more than 5 possible solutions

    Hi,

    I've added the formula in the first three relevant cells of column Q.

    Not quite sure what you're expecting for the PPP column since you seen to have a formula in there already. However if you're trying to lookup another value just follow the same logic as the other column Q formula.

    HTH
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-20-2010
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Using IF function when you have more than 5 possible solutions

    at the end of the formula u have put a

    ,2

    please can you tell me what this is for so i know when i am adapting it for other places where a similar formula is needed.

    thanks

  12. #12
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using IF function when you have more than 5 possible solutions

    Hi,

    A VLOOKUP() function contains three elements plus an optional fourth element. In this case we're using just the three elements. The third element, the value 2 in this example, picks the value from the 2nd column in the range defined by the second element. The second element refers to the range AE3:AG12, hence the second column is column AG.

    HTH

  13. #13
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using IF function when you have more than 5 possible solutions

    Hi,

    A VLOOKUP() function contains three elements plus an optional fourth element. In this case we're using just the three elements. The third element, the value 2 in this example, picks the value from the 2nd column in the range defined by the second element. The second element refers to the range AE3:AG12, hence the second column is column AG.

    HTH

+ 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