Sort a Table on two Columns with VBA

AllisterB

Board Regular
Joined
Feb 22, 2019
Messages
120
Office Version
  1. 365
Platform
  1. Windows
I need to be able to sort a Table on two Columns


This approach used a Full outer Join to Merge eth two tables. It worked for one column but I now need to look up on two Columns - What is the Price for Customer ABC at date X.

Can I use the same approach or is there another approach in PQ

Thanks

Allister

Effective Price.xlsx
BCDEFGHIJKLM
6
7TransactionsPrice List
8DateCustomerSales ValueQtyPriceEffectiveCustomerPrice
91/04/2020ABC100.00$ 20.0051/04/2019ABC5
102/07/2020DEF3200.00$ 320.001030/04/2020DEF10
1117/07/2020ABC20.00$ 4.0051/08/2020ABC12
1231/07/2020DEF50.00$ 5.001017/08/2020GHI3
131/01/2021GHI30.00$ 10.00331/12/2021ABC11
1417/01/2021ABC1100.00$ 100.0011
15
Sheet1
Cell Formulas
RangeFormula
F9:F14F9=[@[Sales Value]]/[@Price]
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Watch MrExcel Video

Forum statistics

Threads
1,129,486
Messages
5,636,614
Members
416,929
Latest member
Nitil

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
Top