Hi All,
Good day!
I would like to have a macr which can help me to find the lowest price in a range then copy the value & vendor to column next to price. I can do it if the range is in column but not as below.
My data as below:
As example, there are 4 vendor can supply part P1 with different price. V1 & V2 are the vendor with lowest prices. This macro will help me to copy the vendor & price to first row of P1.
The result should as below:
Can somebody help me on this?
Good day!
I would like to have a macr which can help me to find the lowest price in a range then copy the value & vendor to column next to price. I can do it if the range is in column but not as below.
My data as below:
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Part | Vendor | Price | |||
2 | P1 | V1 | 0.01 | |||
3 | P1 | V2 | 0.01 | |||
4 | P1 | V3 | 0.015 | |||
5 | P1 | V4 | 0.02 | |||
6 | P2 | V1 | 0.35 | |||
7 | P2 | V5 | 0.37 | |||
8 | P2 | V6 | 0.355 | |||
9 | P2 | V3 | 0.36 | |||
10 | P3 | V7 | 1.3 | |||
11 | P3 | V5 | 1.2 | |||
12 | P3 | V4 | 1.15 | |||
Sheet1 |
As example, there are 4 vendor can supply part P1 with different price. V1 & V2 are the vendor with lowest prices. This macro will help me to copy the vendor & price to first row of P1.
The result should as below:
Book1 | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Part | Vendor | Price | SelectedVendor | Lowerprice | ||
2 | P1 | V1 | 0.01 | V1 | 0.01 | ||
3 | P1 | V2 | 0.01 | V2 | 0.01 | ||
4 | P1 | V3 | 0.015 | ||||
5 | P1 | V4 | 0.02 | ||||
6 | P2 | V1 | 0.355 | V6 | 0.35 | ||
7 | P2 | V5 | 0.37 | ||||
8 | P2 | V6 | 0.35 | ||||
9 | P2 | V3 | 0.36 | ||||
10 | P3 | V7 | 1.3 | V5 | 1.2 | ||
11 | P3 | V5 | 1.2 | ||||
12 | P3 | V4 | 1.15 | ||||
Sheet1 |
Can somebody help me on this?