Correction Macro

MR3

Board Regular
Joined
Jun 10, 2008
Messages
175
Current XL Sheet (Before Macro):


http://g.imageshack.us/g.php?h=383&i=beforeif8.png

After Macro XL Sheet (After Macro):


http://g.imageshack.us/g.php?h=383&i=afteroz1.png

*****************************************************

Before XL Sheet: All the formulas are in place. The data in the Column C is formatted white.

After the Macro is run I would like all that data to turn Black and then fill the "FALSE" rows to be Red.

So far the code I have is:

Sub Correction_Macro()
Range("C1").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=INT(C1)=FALSE"
Selection.FormatConditions(1).Interior.ColorIndex = 2
Selection.Copy
FinalRow = Range("C15000").End(xlUp).Row
Range("C2:C" & FinalRow).Select
Selection.PasteSpecial Paste:=xlPasteFormats
End Sub

Help would be greatly appreciated, THANKS!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Perhaps:

Code:
Sub test()
Dim lastrow As Long
lastrow = Range("C15000").End(xlUp).Row
Range("A:C").FormatConditions.Delete
Range("C:C").Font.Color = vbBlack
With Range("A3:C" & lastrow).FormatConditions
    .Add Type:=xlExpression, Formula1:="=RC3=FALSE"
    .Item(1).Interior.Color = vbRed
End With
End Sub
 
Upvote 0
Thanks alot! Code works. However, it locks the color to red once the code is run. It wont let me change it back to "No Fill" Manually.
 
Upvote 0
No, because it's Conditional Formatting.
You have to delete the Formatting Condition to turn it off.
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,749
Members
449,094
Latest member
dsharae57

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