Results 1 to 8 of 8

Thread: Increase price in cell by 2 dollars if size is 2T

  1. #1

    Increase price in cell by 2 dollars if size is 2T



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello,

    Im new here and hope im posting this in the correct area and would appreciate your assistance and guidance.
    I have a spread work book with 4 columns, A,B,C and D would be the result cell.
    Click image for larger version. 

Name:	excel.JPG 
Views:	14 
Size:	15.5 KB 
ID:	3159


    Im trying to figure a formula which would look up values in column A1 and if the value is greater or equal to size 2T, then it would increase the price in column
    C by $2 dollars and place this in to column D.
    The example of the increased price would be item in A2 and A3 whose prices were increased by 2 dollars in D2 and D3.

    Ive tried =IF(A1=>"24m",D1+2) to no avail. Any suggestions would be greatly appreciated.
    Thanks in advance.
    Last edited by excel1; 2015-02-14 at 03:10 AM.

  2. #2
    Conjurer sambit's Avatar
    Join Date
    Sep 2014
    Posts
    143
    Articles
    0
    Excel Version
    Excel2007
    Hi,
    pl check the file. can it solve your issue ?
    Attached Files Attached Files

  3. #3
    HI Sambit,


    Thank you very much for your reply. I made a mistake in trying to better explain what I was trying to accomplish. Sorry about that.
    The sizes I need the lookup to reference with price increase are as follows.


    NB,3m, 4m, 6m, 9m,12m, 18m, 24m. The formula should not increase this sizes prices, but leave at its default in this case $20.97. Then for the larger size:
    2T, 3T, 4T, these items price should increase by $2 for this range of sizes, to $22.97. Then the last of the sizes,
    5Y,6Y,7Y,8Y should increase by $2 dollars, making it $24.97.


    I have attached the file. The bottom table shows what it should look like.
    Thank you once again for your help and expertise.
    test-lookup-2.xlsx

  4. #4
    Quote Originally Posted by excel1 View Post
    HI Sambit,


    Thank you very much for your reply. I made a mistake in trying to better explain what I was trying to accomplish. Sorry about that.
    The sizes I need the lookup to reference with price increase are as follows.


    NB,3m, 4m, 6m, 9m,12m, 18m, 24m. The formula should not increase this sizes prices, but leave at its default in this case $20.97. Then for the larger size:
    2T, 3T, 4T, these items price should increase by $2 for this range of sizes, to $22.97. Then the last of the sizes,
    5Y,6Y,7Y,8Y should increase by $2 dollars, making it $24.97.


    I have attached the file. The bottom table shows what it should look like.
    Thank you once again for your help and expertise.
    test-lookup-2.xlsx

    I changed your fomula Sambit from =IFERROR(VLOOKUP(A8,$H$4:$I$17,2,TRUE)+C8,"") to =IFERROR(VLOOKUP(A8,$H$4:$I$17,2,FALSE)+C8,"") and it appears to work.
    Is this what you would do or do you have another suggestion? Again thanks for teaching this rookie.

  5. #5
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,819
    Articles
    0
    Excel Version
    O365
    Shouldn't it be

    =C8+IFERROR(VLOOKUP(A8,$H$4:$I$16,2,FALSE),0)

  6. #6
    Quote Originally Posted by Bob Phillips View Post
    Shouldn't it be

    =C8+IFERROR(VLOOKUP(A8,$H$4:$I$16,2,FALSE),0)


    Hi Bob,

    What would be the advantages and disadvantages of of the formula over the other? Thanks in advance.

    Code:
     
    =C4+IFERROR(VLOOKUP(A8,$H$4:$I$16,2,FALSE),0)
    
    =IFERROR(VLOOKUP(A4,$H$4:$I$20,2,TRUE)+C4,"")

  7. #7
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,819
    Articles
    0
    Excel Version
    O365
    It is not a question of advantage, it is a question of correctness. With your formula, if the VLOOKUP found no match, you would not get a value showing, because the +C8 is embedded in the IFERROR. My version separates the C8, so that if the VLOOKUP errors, you return the original value, not blank.

  8. #8
    Thanks to both Sambit for the original formula and Bob for the explanation and updated version of the formula.
    I have used both formulas and found them very helpful for my specific situation.
    They are both greatly appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •