Macro to turn all cell with purple font into values

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,

Not sure if this is posible but what i need is a macro that can turn all purple font cells from formulas to values?
PS if its not posible I could make the cell fill purple instead?

please help if you can tony
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
This will check all cells with formulas on the active sheet, and convert to values the ones with purple font.

It is not necessary to check cells that do not have formulas because they will either be empty or already have values.

A formula that returns a blank will still be converted if the cell has purple font.

You did not define what you mean by "purple." This code uses 112, 48, 160. Modify to suit.
VBA Code:
Public Sub PurpleToValues()

   Dim Cell As Range
   
   For Each Cell In ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)
      
      If Cell.Font.Color = RGB(112, 48, 160) Then
         Cell.Value = Cell.Value
      End If
   
   Next Cell
   
End Sub
 
Upvote 0
Hi Six String Jazzer
that is perfect thank you so much
Merry Christmas
Thanks
Tony
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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