abraham30
05-13-2012, 03:13 AM
In the sheet, I have data like this
ibm emp in us=120
csc emp in uk=25
apple emp in russia=0
ibm emp working in bursal=32
chinese emp in us=0
0duncal favour=89
apple 0 in mumbai=89
etc...
Any vba code where ever I will find zero(not zero of 10,120) as for russia, I want to put one word as No cases.i.e.
apple emp in russia=No cases
chinese emp in us=No cases
I have written the macro below but why it is not working
Sub subst()
Range("B1:B65000").Formula = "=Substitute(B1, ""=0"", ""=No cases"")"
End Sub
ibm emp in us=120
csc emp in uk=25
apple emp in russia=0
ibm emp working in bursal=32
chinese emp in us=0
0duncal favour=89
apple 0 in mumbai=89
etc...
Any vba code where ever I will find zero(not zero of 10,120) as for russia, I want to put one word as No cases.i.e.
apple emp in russia=No cases
chinese emp in us=No cases
I have written the macro below but why it is not working
Sub subst()
Range("B1:B65000").Formula = "=Substitute(B1, ""=0"", ""=No cases"")"
End Sub