If cell contains x, then return a value

harky

Active Member
Joined
Apr 8, 2010
Messages
405
Office Version
  1. 2021
  2. 2019
Platform
  1. Windows
Possible to do?
If vendor AP, 1box = $1, if AM1Box = $2

i had few box size with diff price.

the formula will be at Column C based on Column A

or should use match?

BP_Actual Qty & Costs_2021 (as @ 14Oct21).xlsx
ABC
11 boxVendor 1 box
21AP$ 1.00
32AM$ 4.00
410AP$ 10.00
Sheet1
 
Last edited:

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Do you mean:

Excel Formula:
=A2*IF(B2="AP",1,2)
 
Upvote 0
Do you mean:

Excel Formula:
=A2*IF(B2="AP",1,2)
dont think is correct?

the formula will put at column C

so

if vendor is AP, C will auto calculate the total price based on Column A (1 Box for AP is $1)
if vendor is AM, C will auto calculate the total price based on Column A (1 Box for AM is $2)
 
Upvote 0
So how is the formula wrong?
 
Upvote 0
Data list

BP_Actual Qty & Costs_2021 (as @ 14Oct21).xlsx
ABCDE
11 box 2 Box Vendor (AM or AP) 1 box 2 Box
210AP$ 1.00
320AM$ 4.00
45AP$ 15.00
Sheet1



This is my unit price

BP_Actual Qty & Costs_2021 (as @ 14Oct21).xlsx
JKL
2Unit Price
3AMAP
4 1 box $ 1.00$ 2.00
5 2 Box $ 2.00$ 4.00
6 3 Box $ 3.00$ 6.00
Sheet1
 
Upvote 0
Hi,

Did you actually try RoryA 's formula?
If you try the formula, you'll see it calculates as you described.
 
Upvote 0
Hi,

Did you actually try RoryA 's formula?
If you try the formula, you'll see it calculates as you described.
i try.. but it wont work if i had more than 3..

Mean AP AM or other...
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top