Summary sheet colour

mattless1

Board Regular
Joined
Apr 1, 2011
Messages
102
Hi All,

I have a summary sheet with all my suppliers on it.
is there a way I can colour the supplier names in the summary sheet with colour of their tabs.

thanks in advance.
 
Did you copy the entire code, or did you miss the last line?
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
This is what I copied, the first line is yellow

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sub ColorSupplier()
Dim supplier As Range, ws As Worksheet
For Each supplier In Sheets("Summary").Range("A4", Sheets("Summary").Range("A" & Rows.Count).End(xlUp))
For Each ws In ActiveWorkbook.Sheets
If UCase(ws.Name) = UCase(supplier) Then
supplier.Interior.Color = ws.Tab.Color
Exit For
End If
Next ws
Next supplier
End Sub
 
Upvote 0
Get rid of the first line and just use the code as supplied
 
Upvote 0
Hi Fluff,

yes that works perfect.

thank you and Yongle for helping me out. :) I would of never done it with out you.

Kind Regards,
Larry.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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