excel vba color tab + name manager

Status
Not open for further replies.

kelvin_9

Active Member
Joined
Mar 6, 2015
Messages
444
Office Version
  1. 2019
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?
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
ABCD
1product_Aproduct_Bproduct_ Cproduct_D
2400000020143400000055954400000215198400000215761
3400000027333400000077086400000215501400000217741
4400000029153400000169071400000215686400000220796
5400051256157400000214511400050880131400000221526
6400000214696400000221601
7400000214931
8
9
10
Sheet1


sheet2
*this tab should be yellow
Book1
ABCDEFGHIJ
1Order SNREADY TO PICK
2Order Date
3Type
4Number
5Pick Up
6Remarks
7Picker Name
8
9#UPCUPC ProductNameQuantityUnit PriceSubtotalQty pickedPending pickup qtyRemark
101400051256140400051256140
112400051256157400051256157
12
13Total
14Discount
15Total Amount
220321003428226457


sheet3
*this tab should no change
Book1
ABCDEFGHIJ
1Order SNREADY TO PICK
2Order Date
3Type
4Number
5Pick Up
6Remarks
7Picker Name
8
9#UPCUPC ProductNameQuantityUnit PriceSubtotalQty pickedPending pickup qtyRemark
101400051069733400051069733
11
12Total
13Discount
14Total Amount
220321103024974105


sheet4
*this tab should be red
Book1
ABCDEFGHIJ
1Order SNREADY TO PICK
2Order Date
3Type
4Number
5Pick Up
6Remarks
7Picker Name
8
9#UPCUPC ProductNameQuantityUnit PriceSubtotalQty pickedPending pickup qtyRemark
101400050587146400050587146
112400050880131400050880131
12
13Total
14Discount
15Total Amount
220321125201877498
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Duplicate to:excel vba color tab

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread. If you do not receive a response, you can "bump" it by replying to it yourself, though we advise you to wait 24 hours before doing so, and not to bump a thread more than once a day.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,402
Messages
6,124,708
Members
449,182
Latest member
mrlanc20

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