Hi Prafull,
Try this if you want to use In Cell formulas, paste bellow code in module
Function IsOK(CRef As Range) As String
Dim Str As String
Str = UCase(CRef.Value)
If InStr(1, Str, YES) Or InStr(1, Str, NO) Or InStr(1, Str,
CORRECT) Then IsOK = OK
End Function
Then just type in
Dear All,
I have made one macro for search word in column
like
NO
YES
Correct
if this words are in cell then write the OK in next cell .
I have query that I have used elseif many time. Is there any other way in
which i can write macro in one line
for example
if A1 contain words like
Try this
Sub query()
Dim rng As Range
Dim cel As Range
Set rng = Range(A1:a10)
For Each cel In rng
If cel = Yes Or cel = No Or cel = Correct Then
cel.Offset(0, 1) = Ok
End If
Next cel
End Sub
Thanks regards,
www.MrExcel4U.com http://mrexcel4u.blogspot.com/
On Wed, Feb