have a macro which i got from this forum . It goegoes as follows
Sub Test()
For I = 1 To Sheets.Count
Sheets(I).Select
Dim Sh As Worksheet
Dim LastCol As Integer
Dim Lastrow As Integer
Set Sh = ActiveSheet
With Sh
LastCol = .Cells(14, .Columns.Count).End(xlToLeft).Column
Lastrow = .Cells(.Rows.Count, 1).End(xlUp).Row
.Range(.Cells(14, LastCol + 1), .Cells(Lastrow, LastCol + 3)).FormulaR1C1 = "=RC[-3]-RC[-4]" .Cells(1, LastCol + 1).EntireColumn.Insert
End With
Next I
End Sub
Is there a way in which i can apply conditional formatng to the the range marked in bold. I require to mark any values not between -4 and 4 in bold red
Sub Test()
For I = 1 To Sheets.Count
Sheets(I).Select
Dim Sh As Worksheet
Dim LastCol As Integer
Dim Lastrow As Integer
Set Sh = ActiveSheet
With Sh
LastCol = .Cells(14, .Columns.Count).End(xlToLeft).Column
Lastrow = .Cells(.Rows.Count, 1).End(xlUp).Row
.Range(.Cells(14, LastCol + 1), .Cells(Lastrow, LastCol + 3)).FormulaR1C1 = "=RC[-3]-RC[-4]" .Cells(1, LastCol + 1).EntireColumn.Insert
End With
Next I
End Sub
Is there a way in which i can apply conditional formatng to the the range marked in bold. I require to mark any values not between -4 and 4 in bold red