![]() |
Coppying cells, including conditional formatting ('03 & '07)
I need some help modifying this code to include the formatting of the cell
(conditional formatting): If Not Intersect(Target, Range("b4:b7")) Is Nothing Then Worksheets("DuplicateSheet").Range("b11:b14") = Worksheets("OriginalSheet").Range("b4:b7").Value End If This is activated on the Worksheet_Change event. This code successfully copies that range of cells to the duplicate sheet should I make a change to one of them, but the conditional formatting is left behind. How can I drag the formatting over as well? Thanks! |
Coppying cells, including conditional formatting ('03 & '07)
hi
you code is writen to transfer values only. i would suggest you use the copy command.... If Not Intersect(Target, Range("b4:b7")) Is Nothing Then Worksheets("DuplicateSheet").Range("b11:b14").Copy Destination:= _ Worksheets("OriginalSheet").Range("b4:b7") End If regards FSt1 "Raymond W." wrote: I need some help modifying this code to include the formatting of the cell (conditional formatting): If Not Intersect(Target, Range("b4:b7")) Is Nothing Then Worksheets("DuplicateSheet").Range("b11:b14") = Worksheets("OriginalSheet").Range("b4:b7").Value End If This is activated on the Worksheet_Change event. This code successfully copies that range of cells to the duplicate sheet should I make a change to one of them, but the conditional formatting is left behind. How can I drag the formatting over as well? Thanks! |
Coppying cells, including conditional formatting ('03 & '07)
Awesome. I swapped everything around and it works as expected. Thank you very
much for the fast response! "FSt1" wrote: hi you code is writen to transfer values only. i would suggest you use the copy command.... If Not Intersect(Target, Range("b4:b7")) Is Nothing Then Worksheets("DuplicateSheet").Range("b11:b14").Copy Destination:= _ Worksheets("OriginalSheet").Range("b4:b7") End If regards FSt1 |
Coppying cells, including conditional formatting ('03 & '07)
glad to help.
regares FSt1 "Raymond W." wrote: Awesome. I swapped everything around and it works as expected. Thank you very much for the fast response! "FSt1" wrote: hi you code is writen to transfer values only. i would suggest you use the copy command.... If Not Intersect(Target, Range("b4:b7")) Is Nothing Then Worksheets("DuplicateSheet").Range("b11:b14").Copy Destination:= _ Worksheets("OriginalSheet").Range("b4:b7") End If regards FSt1 |
All times are GMT +1. The time now is 10:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com