+ Reply to Thread
Results 1 to 15 of 15

IF Statement

  1. #1
    Registered User
    Join Date
    05-18-2017
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2016
    Posts
    16

    IF Statement

    Hello everyone,

    I was hoping if someone could help me out with an IF Statement that will tell me where I should apply my additional cost, either to shipping price or retail price. For instance, I have an additional cost of $0.99 that I would like to add to either the shipping price or my retail price. What I am trying to achieve here is if the retail price is anywhere from $0.01 - $8.99, I want the $0.99 added to the retail price. If the item has a retail price of something like $9.99 or $29.99, then I want to add the $0.99 to the shipping price.

    Any help would be greatly appreciated.

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: IF Statement

    Hi couevans- The attached workbook demonstrates how you could implement your If statements.

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Attached Files Attached Files

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

    Re: IF Statement

    something like this??? =IF(A2<9,0.99&" retail price",0.99&" shipping price")
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Registered User
    Join Date
    05-18-2017
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: IF Statement

    That is exactly what I needed. Thank you. However, what if i want to hit the values that are between $10.01 - $18.99 and so forth that aren't $9.99, $19.99, etc.?

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

    Re: IF Statement

    Whose post are you addressing?

  6. #6
    Registered User
    Join Date
    05-18-2017
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: IF Statement

    Sorry about that. I was addressing yours. @Sambokid

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

    Re: IF Statement

    I'm not sure of your question then. My formula will tag every value less than $9.00 as "0.99 retail price" and every value above 8.99 as "0.99 shipping price". That is what I took from your original posted question.

  8. #8
    Registered User
    Join Date
    05-18-2017
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: IF Statement

    Sorry for the confusion. Any value that is between 0.01 - 8.99, then yes, it will need 0.99 added to the retail price. However, the values in between 10.00 - 18.99 will also need the 0.99 added to the retail price. Same goes for 20.00 - 28.99 and so forth.

    As for values that have 9.99, 19.99, 29.99, etc., they will need the 0.99 added to the shipping price.

    Does this make sense? I am working with items that have a wide range of retail prices - not just 9.99 and under. Thanks for your help on this, it's greatly appreciated.

  9. #9
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,279

    Re: IF Statement

    Dear Conuevans, if retail price 8.99 than add 0.01 in retail price &
    if retail price 8.01 than added 0.99 in retail price & same applicable for shipping price.
    or
    if retail price 8.99 than add 0.01 in shipping price
    if retail price 8.01 than added 0.99 in shipping price
    kindly give output result (enter manually) with all aspects.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

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

    Re: IF Statement

    how far do these increments go?

  11. #11
    Registered User
    Join Date
    05-18-2017
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: IF Statement

    Sambo kid, they go up to 119.99.

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

    Re: IF Statement

    given your parameters I would probably build a table and use a vlookup. See the attached as an example.
    Attached Files Attached Files

  13. #13
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: IF Statement

    If the .99 cost is in B1, Retail price is in cell B2, and Shipping price is in B3:
    This formula shows the adjusted shipping price for ANY x9.99 trigger amounts {9.99,19.99,29.99,...}, otherwise leaves it unchanged:

    =IF(MOD($B$2,10)=9.99,$B$3+$B$1,$B$3)

    The corresponding formula adjusts the retail price for any amounts EXCEPT the x9.99 triggers:

    =IF(MOD($B$2,10)=9.99,$B$2,$B$2+$B$1)


    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 05-25-2017 at 05:29 PM.

  14. #14
    Registered User
    Join Date
    05-18-2017
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: IF Statement

    You are a life saver, Sambo kid! Thank you so much for your help.

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

    Re: IF Statement

    You're welcome and thank you for the rep!

+ 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. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  2. [SOLVED] If statement to select data - nested statement - assistance
    By petitesouris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-29-2015, 09:55 PM
  3. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  4. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  5. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  6. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  7. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 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