ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula that perfectly copies data from another cell (with color)? (https://www.excelbanter.com/excel-programming/315464-formula-perfectly-copies-data-another-cell-color.html)

Ron Wood[_2_]

Formula that perfectly copies data from another cell (with color)?
 
I need to refer to another cell along with the background formatting.
In other words if A(1) has a value of 200, and the background is red,
I want another cell to point to A(1) as well as maintain the
formatting of A(1).

Thanks
Ron

Ron de Bruin

Formula that perfectly copies data from another cell (with color)?
 
Not possible with a formula.

You can use the change event in the worksheet module
but if you only change the color of the cell the change event will not run

Something like this
Copy format and value of A1 to C1 if you change A1

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
Target.Copy Range("C1")
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron Wood" wrote in message om...
I need to refer to another cell along with the background formatting.
In other words if A(1) has a value of 200, and the background is red,
I want another cell to point to A(1) as well as maintain the
formatting of A(1).

Thanks
Ron





All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com