Share via

Replace a column value based on another column value - in excel

Anonymous
2024-05-20T22:23:11+00:00

If I want to change a cost based on a quantity, is there a way to do that? Example below - If the quantity is between 1-30, the cost will be $30. If the quantity is 30-60, the cost will be $28. If the quantity is 60-150, the cost is $26.

Quantity Cost
150 $                26.00
Microsoft 365 and Office | Excel | Other | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-05-20T22:59:52+00:00

    Hi Karalee

    Please, try the following

    1. Anywhere in the workbook create a table as in the picture below columns I:J
    2. Use the formula =IFERROR(VLOOKUP(A2,$I$1:$J$5,2,1),0)

    Adapt the ranges in the formula according to your scenario.

    Regards

    Jeovany

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments