Hi I have below code which pin out numbers from IBAN in Column P. Its formulas run by macro. It works fine.
But what i really need is that instead of putting the formula in the cell, is that it compare the value from the formula, with the excisting value , in each cell . And it mark the cells where there are a difference with yellow colour
I have been thinking how to do this but cant really work it out.
If some have a better solution its ok but i need a macro for it.
Please have a look at below code, which change the cell and correct the error, but which i want just to compare the values.
I have attached a sheet to test with.
Thanks
Sincerely
Abjac
The code.
Sub inputformula()
Sheets(1).Activate
Range("F2").Select
ActiveCell.FormulaR1C1 = "=TEXT(MID(RC[10],5,4),""00000"")"
Range("F2").Select
Selection.AutoFill Destination:=Range("F2:F23"), Type:=xlFillDefault
Range("F2:F23").Select
Range("G2").Select
ActiveCell.FormulaR1C1 = "=TEXT(MID(RC[9],9,4),""00000000"")"
Range("G2").Select
Selection.AutoFill Destination:=Range("G2:G23"), Type:=xlFillDefault
Range("G2:G23").Select
Range("H2").Select
ActiveCell.FormulaR1C1 = "=TEXT(RIGHT(RC[8],10),""0000000000"")"
Range("H2").Select
Selection.AutoFill Destination:=Range("H2:H23"), Type:=xlFillDefault
Range("H2:H23").Select
Range("I2").Select
ActiveCell.FormulaR1C1 = "=TEXT(MID(RC[7],13,2),""00"")"
Range("I2").Select
Selection.AutoFill Destination:=Range("I2:I23"), Type:=xlFillDefault
Range("I2:I23").Select
Range("A1").Select
End Sub
Bookmarks