greeting to all
my workbook has more than 50 tabs and I want a vba to return yellow or red with:
- return YELLOW if same value under product_a or product_b was found in column C of each tab
- return RED if same value under product_c or product_d was found in column C of each tab
- no color needed if nothing was found
- run the code on sheet2 onward
any guidance/code would be much appreciated
thank you very much
i have been setup below formulas in sheet1 by using name manager if these would be easily?
sheet1
sheet2
*this tab should be yellow
sheet3
*this tab should no change
sheet4
*this tab should be red
my workbook has more than 50 tabs and I want a vba to return yellow or red with:
- return YELLOW if same value under product_a or product_b was found in column C of each tab
- return RED if same value under product_c or product_d was found in column C of each tab
- no color needed if nothing was found
- run the code on sheet2 onward
any guidance/code would be much appreciated
thank you very much
i have been setup below formulas in sheet1 by using name manager if these would be easily?
Excel Formula:
=OFFSET(Sheet1!$A$2,,,COUNTA(Sheet1!$A$2:$A$100))
Excel Formula:
=OFFSET(Sheet1!$B$2,,,COUNTA(Sheet1!$B$2:$B$100))
Excel Formula:
=OFFSET(Sheet1!$C$2,,,COUNTA(Sheet1!$C$2:$C$100))
Excel Formula:
=OFFSET(Sheet1!$D$2,,,COUNTA(Sheet1!$D$2:$D$100))
sheet1
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | product_A | product_B | product_ C | product_D | ||
2 | 400000020143 | 400000055954 | 400000215198 | 400000215761 | ||
3 | 400000027333 | 400000077086 | 400000215501 | 400000217741 | ||
4 | 400000029153 | 400000169071 | 400000215686 | 400000220796 | ||
5 | 400051256157 | 400000214511 | 400050880131 | 400000221526 | ||
6 | 400000214696 | 400000221601 | ||||
7 | 400000214931 | |||||
8 | ||||||
9 | ||||||
10 | ||||||
Sheet1 |
sheet2
*this tab should be yellow
Book1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Order SN | READY TO PICK | ||||||||||
2 | Order Date | |||||||||||
3 | Type | |||||||||||
4 | Number | |||||||||||
5 | Pick Up | |||||||||||
6 | Remarks | |||||||||||
7 | Picker Name | |||||||||||
8 | ||||||||||||
9 | # | UPC | UPC Product | Name | Quantity | Unit Price | Subtotal | Qty picked | Pending pickup qty | Remark | ||
10 | 1 | 400051256140 | 400051256140 | |||||||||
11 | 2 | 400051256157 | 400051256157 | |||||||||
12 | ||||||||||||
13 | Total | |||||||||||
14 | Discount | |||||||||||
15 | Total Amount | |||||||||||
220321003428226457 |
sheet3
*this tab should no change
Book1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Order SN | READY TO PICK | ||||||||||
2 | Order Date | |||||||||||
3 | Type | |||||||||||
4 | Number | |||||||||||
5 | Pick Up | |||||||||||
6 | Remarks | |||||||||||
7 | Picker Name | |||||||||||
8 | ||||||||||||
9 | # | UPC | UPC Product | Name | Quantity | Unit Price | Subtotal | Qty picked | Pending pickup qty | Remark | ||
10 | 1 | 400051069733 | 400051069733 | |||||||||
11 | ||||||||||||
12 | Total | |||||||||||
13 | Discount | |||||||||||
14 | Total Amount | |||||||||||
220321103024974105 |
sheet4
*this tab should be red
Book1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Order SN | READY TO PICK | ||||||||||
2 | Order Date | |||||||||||
3 | Type | |||||||||||
4 | Number | |||||||||||
5 | Pick Up | |||||||||||
6 | Remarks | |||||||||||
7 | Picker Name | |||||||||||
8 | ||||||||||||
9 | # | UPC | UPC Product | Name | Quantity | Unit Price | Subtotal | Qty picked | Pending pickup qty | Remark | ||
10 | 1 | 400050587146 | 400050587146 | |||||||||
11 | 2 | 400050880131 | 400050880131 | |||||||||
12 | ||||||||||||
13 | Total | |||||||||||
14 | Discount | |||||||||||
15 | Total Amount | |||||||||||
220321125201877498 |