ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change formulas into values based on cell color (https://www.excelbanter.com/excel-programming/375758-change-formulas-into-values-based-cell-color.html)

Aria[_2_]

Change formulas into values based on cell color
 
Hello,
"Source" tab includes formulas that link to other tabs. Those specific
formulas are indicated by color code [Light Turquoise].

After copying the entire sheet's data (Select All - Copy) into another
tab called "Destination".

How do you:
1) Change the contents of all [Light Turquoise] cells only from formulas
into values?
2) Then, change all [Light Turquoise] cells into no color?

Thanks so much,
Aria

*** Sent via Developersdex http://www.developersdex.com ***

[email protected]

Change formulas into values based on cell color
 
This will change the cell interior color and formulas to values after
you copy to the new sheet.

Sub TestFormat()
Dim MyCell As Range
For Each MyCell In Selection
If MyCell.Interior.ColorIndex = 8 Then
MyCell.Value = MyCell.Value
MyCell.Interior.ColorIndex = xlColorIndexNone
End If
Next
End Sub


Aria wrote:
Hello,
"Source" tab includes formulas that link to other tabs. Those specific
formulas are indicated by color code [Light Turquoise].

After copying the entire sheet's data (Select All - Copy) into another
tab called "Destination".

How do you:
1) Change the contents of all [Light Turquoise] cells only from formulas
into values?
2) Then, change all [Light Turquoise] cells into no color?

Thanks so much,
Aria

*** Sent via Developersdex http://www.developersdex.com ***



Aria[_2_]

Change formulas into values based on cell color
 
It worked. Thank-you very much. This really helps me a lot.

Aria :)


*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 03:16 AM.

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