ScarletHolmes
New Member
- Joined
- Apr 13, 2021
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
I have two sheets in my workbook pertaining to this question.
Sheet 1 - The full list of sellable products with their profit centers, classes, descriptions, ..., amount in currency. I won't be able to use xl2bb to copy a portion for you to see, so I've included a picture.
Sheet 2 - A subset of the items first sheet. This sheet has the prices that I want the first sheet to be updated to when I run the macro, but they're in different columns.
For all the skus in sheet 2's columns E, H, L, R, and V, I'd like the cells corresponding to that sku in sheet 1 to get the prices in sheet 2's columns F, J, N, T, X
I don't have much experience writing VBA code, but any help would be appreciated.
Sheet 1 - The full list of sellable products with their profit centers, classes, descriptions, ..., amount in currency. I won't be able to use xl2bb to copy a portion for you to see, so I've included a picture.
Sheet 2 - A subset of the items first sheet. This sheet has the prices that I want the first sheet to be updated to when I run the macro, but they're in different columns.
For all the skus in sheet 2's columns E, H, L, R, and V, I'd like the cells corresponding to that sku in sheet 1 to get the prices in sheet 2's columns F, J, N, T, X
I don't have much experience writing VBA code, but any help would be appreciated.
PASTE THIS TO DYNAMICS.xlsx | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | J | K | L | N | O | P | Q | R | T | U | V | X | Y | Z | |||||||
1 | name | info | Display Desc | BoxNum | BOX PRICE | std mat | STD MAT | std serv | STD SERV | Std Price | frag mat | FRG MAT | frag serv | FRG SERV | Frg Price | ||||||||||||
2 | 04x04x04 | box | 10012 | $ 4.00 | 20604 | $ 2.00 | 30604 | $ 2.00 | $ 8.00 | 20603 | $ 3.30 | 30603 | $ 3.00 | $ 10.30 | |||||||||||||
3 | 06x06x06 | box | 10001 | $ 4.35 | 20007 | $ 2.20 | 30007 | $ 2.00 | $ 8.55 | 20008 | $ 3.30 | 30008 | $ 3.00 | $ 10.65 | |||||||||||||
4 | 06x06x48 | box | 10078 | $ 9.00 | 20154 | $ 6.10 | 30229 | $ 8.00 | $ 23.10 | 20155 | $ 8.30 | 30230 | $ 9.00 | $ 26.30 | |||||||||||||
5 | 08x05x03 | box | Flat | 10133 | $ 3.99 | 20682 | $ 1.70 | 30682 | $ 2.00 | $ 7.69 | 20681 | $ 2.20 | 30681 | $ 3.00 | $ 9.19 | ||||||||||||
6 | 08x08x08 | box | 10002 | $ 4.75 | 20010 | $ 2.80 | 30010 | $ 2.00 | $ 9.55 | 20011 | $ 5.50 | 30011 | $ 3.00 | $ 13.25 | |||||||||||||
7 | 09x05x03 | box | Cellphone Box | 10147 | $ 7.99 | 20724 | $ 1.70 | 30724 | $ 2.00 | $ 11.69 | 20723 | $ 2.20 | 30723 | $ 3.00 | $ 13.19 | ||||||||||||
8 | 10x10x10 | box | 10004 | $ 5.80 | 20016 | $ 4.00 | 30016 | $ 2.00 | $ 11.80 | 20017 | $ 7.20 | 30017 | $ 3.00 | $ 16.00 | |||||||||||||
9 | 12x09x03 | Tuck Top Box | Flat | 10058 | $ 4.99 | 20175 | $ 1.70 | 30175 | $ 2.00 | $ 8.69 | 20176 | $ 2.20 | 30176 | $ 3.00 | $ 10.19 | ||||||||||||
10 | 12x06x06 | box | 101222 | $ 5.80 | 20868 | $ 4.00 | 30865 | $ 2.00 | $ 11.80 | 20867 | $ 7.20 | 30864 | $ 3.00 | $ 16.00 | |||||||||||||
11 | 12x09x06 | box | 101235 | $ 5.80 | 20904 | $ 4.00 | 30901 | $ 2.00 | $ 11.80 | 20903 | $ 7.20 | 30900 | $ 3.00 | $ 16.00 | |||||||||||||
12 | 12x12x06 | box | 10060 | $ 5.80 | 20181 | $ 4.00 | 30181 | $ 2.00 | $ 11.80 | 20182 | $ 7.20 | 30182 | $ 3.00 | $ 16.00 | |||||||||||||
13 | 12x12x12 | box | 10005 | $ 5.85 | 20019 | $ 4.00 | 30019 | $ 2.00 | $ 11.85 | 20020 | $ 8.80 | 30020 | $ 3.00 | $ 17.65 | |||||||||||||
14 | 12x12x30 | box | 101211 | $ 14.85 | 20835 | $ 7.70 | 30832 | $ 8.00 | $ 30.55 | 20834 | $ 17.60 | 30831 | $ 9.00 | $ 41.45 | |||||||||||||
15 | 13x10x03 | box | Flat | 110699 | $ 4.99 | 110702 | $ 1.70 | 110706 | $ 2.00 | $ 8.69 | 110701 | $ 3.30 | 110705 | $ 3.00 | $ 11.29 | ||||||||||||
Master_List |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2:E15 | E2 | =INDEX(Clean_Slate!F$1:F$13222,SMALL(IF(CONCAT(B2," ",C2)=Clean_Slate!C$1:C$13222,ROW(Clean_Slate!C$1:C$13222)-ROW(Clean_Slate!C$1)+1),1)) |
H2:H15 | H2 | =INDEX(Clean_Slate!F$1:F$13222,SMALL(IF(CONCAT(B2," Std Pack Materials")=Clean_Slate!C$1:C$13222,ROW(Clean_Slate!C$1:C$13222)-ROW(Clean_Slate!C$1)+1),1)) |
L2:L15 | L2 | =INDEX(Clean_Slate!F$1:F$13222,SMALL(IF(CONCAT(B2," Std Pack Service")=Clean_Slate!C$1:C$13222,ROW(Clean_Slate!C$1:C$13222)-ROW(Clean_Slate!C$1)+1),1)) |
P2:P15 | P2 | =SUM(F2,J2,N2) |
R2:R15 | R2 | =INDEX(Clean_Slate!F$1:F$13222,SMALL(IF(CONCAT(B2," Frg Pack Materials")=Clean_Slate!C$1:C$13222,ROW(Clean_Slate!C$1:C$13222)-ROW(Clean_Slate!C$1)+1),1)) |
V2:V15 | V2 | =INDEX(Clean_Slate!F$1:F$13222,SMALL(IF(CONCAT(B2," Frg Pack Service")=Clean_Slate!C$1:C$13222,ROW(Clean_Slate!C$1:C$13222)-ROW(Clean_Slate!C$1)+1),1)) |
Z2:Z15 | Z2 | =SUM(F2,T2,X2) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
V:V | Expression | =$V1<>$W1 | text | NO |
R:R | Expression | =$R1<>$S1 | text | NO |
H:H | Expression | =$H1<>$I1 | text | NO |
L2:L1048576 | Expression | =$L2<>$M2 | text | NO |