How to calculate data in a cell from two possible columns (A or B)

mediumrare

New Member
Joined
Apr 7, 2021
Messages
31
Office Version
  1. 365
Platform
  1. Windows
Rebates
ABCDEFGHIJ
1productEA costCS costvendor refEA/CSproduct reportqtyuomext
2soap1$ 11.00$ 44.00$ 44.004soap11CS
3soap2$ 22.00$ 88.00$ 90.004soap111EA
4soap4$ 15.00$ 30.00$ 30.002soap45CS
5soap27$ 2.50$ 30.00$ 30.0012soap27CS
6soap122CS
7soap272CS
8soap41,200EA
Sheet4


I'm not sure if I'm describing this correctly/succinctly in the thread title.

I'm trying to have it search a cell to see if it says "EA" or "CS," then pull either the EA $ column or the CS $ column data from the same row, and multiply that by the quantity ordered into extension column of the "product report" table side.

Along the same lines (I think?), I'd like to have the "vendor ref" data be pulled from another sheet in the same workbook. It could search for the product number ("product"), if it matches, then it returns the price in, says, column B.


Honestly, it takes up so much of my time doing this rebate report every month, I wish I could learn everything I'd want to do or, if not that, I'd legitimately pay someone to help me put together what I'd dream of it doing. Because, right now, it's manual. Looking at this, referencing, verifying, compiling, multiplying, matching a contract number to a customer, etc.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Need more information to handle the vendor ref.
Otherwise, is this what you mean for the "ext"? Maybe this will give you a way to calculate the "vendor ref" ?

Book1
ABCDEFGHIJ
1ProductEA CostCS Cost`Vendor RefEA/CSReportQTYUOMExt
2soap1$ 11.00$ 44.00??4soap11CS$ 44.00
3soap2$ 22.00$ 88.00??4soap111EA$ 121.00
4soap4$ 15.00$ 30.00??2soap45CS$ 150.00
5soap27$ 2.50$ 30.00??12soap27CS$ 616.00
6soap122CS$ 968.00
7soap272CS$ 60.00
8soap41,200EA$ 18,000.00
Report
Cell Formulas
RangeFormula
J2:J8J2=H2*INDEX($B$2:$C$5,MATCH(G2,$A$2:$A$5,0),MATCH(I2,LEFT($B$1:$C$1,2),0))
 
Upvote 0
Solution
Need more information to handle the vendor ref.
Otherwise, is this what you mean for the "ext"? Maybe this will give you a way to calculate the "vendor ref" ?

Book1
ABCDEFGHIJ
1ProductEA CostCS Cost`Vendor RefEA/CSReportQTYUOMExt
2soap1$ 11.00$ 44.00??4soap11CS$ 44.00
3soap2$ 22.00$ 88.00??4soap111EA$ 121.00
4soap4$ 15.00$ 30.00??2soap45CS$ 150.00
5soap27$ 2.50$ 30.00??12soap27CS$ 616.00
6soap122CS$ 968.00
7soap272CS$ 60.00
8soap41,200EA$ 18,000.00
Report
Cell Formulas
RangeFormula
J2:J8J2=H2*INDEX($B$2:$C$5,MATCH(G2,$A$2:$A$5,0),MATCH(I2,LEFT($B$1:$C$1,2),0))

Thanks, very much. Yes, that was what I meant. The "ext" (extension) as the correct pricing (each or case) times the quantity ordered.

Are you using LEFT so that it knows where to start looking? Or what else?
 
Upvote 0
Need more information to handle the vendor ref.
Otherwise, is this what you mean for the "ext"? Maybe this will give you a way to calculate the "vendor ref" ?

The "vendor ref" goal(s):
- pulling the vendor pricing from another sheet when the product numbers match; and
- conditionally formatting the "vendor ref" to compare pricing discrepancies with the case price listed

What happens now for these monthly reports:
1. open report for the last month's purchases for Vendor A
2. open rebate template
3. open reference workbook (vendor pricing, contract info [customer, contract no., contract pricing], our into-stock cost reports)
4. rearrange the column order from the report and copy it into the rebate template
5. copy the products into a sheet in the reference wb that has a comparative list of our product numbers next to the vendor's numbers
6. runs an IFERROR(VLOOKUP...) to match the product number from the report with the correct vendor number
7. manually compare products copied into rebate template with products on active contracts, removing ineligible products
8. cross-check UOM (ea/cs) with pricing to request the correct rebate amount
9. manually pull the contract info and match it to the customer
10. die a little inside

If there are any number of steps I can take to mitigate errors, better manage my time, etc., then I'm in.
 
Upvote 0
Thanks, very much. Yes, that was what I meant. The "ext" (extension) as the correct pricing (each or case) times the quantity ordered.

Are you using LEFT so that it knows where to start looking? Or what else?
I used "LEFT" because the column headers in B and C (EA Cost and CS Cost) had the word "Cost" in the heading, so an = would not find it matches.
 
Upvote 0
The "vendor ref" goal(s):
- pulling the vendor pricing from another sheet when the product numbers match; and
- conditionally formatting the "vendor ref" to compare pricing discrepancies with the case price listed

What happens now for these monthly reports:
1. open report for the last month's purchases for Vendor A
2. open rebate template
3. open reference workbook (vendor pricing, contract info [customer, contract no., contract pricing], our into-stock cost reports)
4. rearrange the column order from the report and copy it into the rebate template
5. copy the products into a sheet in the reference wb that has a comparative list of our product numbers next to the vendor's numbers
6. runs an IFERROR(VLOOKUP...) to match the product number from the report with the correct vendor number
7. manually compare products copied into rebate template with products on active contracts, removing ineligible products
8. cross-check UOM (ea/cs) with pricing to request the correct rebate amount
9. manually pull the contract info and match it to the customer
10. die a little inside

If there are any number of steps I can take to mitigate errors, better manage my time, etc., then I'm in.
This is quite a bit of into to digest without an example.
 
Upvote 0
I used "LEFT" because the column headers in B and C (EA Cost and CS Cost) had the word "Cost" in the heading, so an = would not find it matches.
Ah, gotcha. So searching the first 2 characters from the left.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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