VBA to change fill color based on another cell fill color - between 2 worksheets

Robert_G

New Member
Joined
Jul 13, 2018
Messages
48
I have this code and it changes the fill color G25 based on the fill color of G25:


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.Range("g25").Interior.Color = Me.Range("f25").Interior.Color
End Sub


Now how do I change the fill color of F25 in Sheet2 based on the fill color on G25 Sheet1?
 

Some videos you may like

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

shknbk2

Board Regular
Joined
Mar 5, 2016
Messages
240
Code:
Sheets("Sheet2").Range("F25").Interior.Color = Sheets("Sheet1").Range("G25").Interior.Color
 

Watch MrExcel Video

Forum statistics

Threads
1,108,579
Messages
5,523,705
Members
409,531
Latest member
Lmfacc

This Week's Hot Topics

Top