This should be a fairly easy question for you guys, but I can't seem to find a solution online. I have three columns in my dataset where negative values are displayed in red instead of with a preceding '-' sign. I need to multiply these values by -1 if they are in in columns E, I and M AND their font color is -16776961. I've seen a few pieces of code that get close But I don't know how to modify them to do what is required:
If Range("E5:E100").Value = 1 Then Range("").Value = Range("B2").Value * 10
I was also thinking I could do something like this:
For Each c In r
With c
If Not IsError(.Value) Then
Select Case .Color
Case -16776961
.Value = .Value * -1
End Select
End If
End With
Next c
But I'm just not sure what the exact syntax is.
Thanks in advance to anyone who gives this a shot.
Another attempt:
Range("U1").Select
ActiveCell.FormulaR1C1 = "-1"
Rows("4:4").Select
Selection.AutoFilter
Range("U1").Select
Selection.Copy
ActiveSheet.Range("$A$4:$X$43").AutoFilter Field:=5, _
Criteria1:=RGB(232, 88, 88), _
Operator:=xlFilterFontColor
Range("E11:E52").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlMultiply, _
SkipBlanks:=False, _
Transpose:=False