Hi,
I have data in the range of A30 to B187. I want to subtract B-A and update in C( Example: C30=B30-A30) . If A30 & B30 is blank the C30 also blank.
How to write code for this
Hi,
I have data in the range of A30 to B187. I want to subtract B-A and update in C( Example: C30=B30-A30) . If A30 & B30 is blank the C30 also blank.
How to write code for this
Try this macro
Sub my_code() With Range("C30:C187") .Formula = _ "=IF(AND(A30="""",B30=""""),"""",B30-A30)" .Value = .Value End With End Sub
Dear Salim Ali
Thanks for your reply. The code is working good.
Dear Salim,
I have data updating in range "H30 to H186". If any value is going more than 2 in C column cell color to be change in yellow.
For example H40 value is >= +or- 2 then C40 cell color to be change in yellow and popup message to be display that " C40 value is crossed 2"
How can i do this code