rakesh seebaruth
Active Member
- Joined
- Oct 6, 2011
- Messages
- 303
HI Guys
i have the following table
I
L S
Mr John Smith
Mr Jack Paul and Mrs Jack Paul
my vba codes are as follows:-
Sub x()
Dim TR As Long
TR = Cells(Rows.Count, "I").End(xlUp).Row
Range("L2:L" & TR) = Evaluate("IF(ISNUMBER(SEARCH(""MR"",I2:I" & TR & ")),""Dear Sir"","""")")
Dim SS As Long
SS = Cells(Rows.Count, "L").End(xlUp).Row
Range("S2:S" & SS) = Evaluate("IF(ISNUMBER(SEARCH(""Dear Sir"",L2:L" & SS & ")),""your banking facility"","""")")
End Sub
What i want is
if in column I there are Mr and Mrs then column L= Dear Sir/Madam. and if L= Dear Sir/Madam then Column S= your banking facilities.
With Mr its works well.
Thanks for your help
regards
rakesh
i have the following table
I
L S
Mr John Smith
Mr Jack Paul and Mrs Jack Paul
my vba codes are as follows:-
Sub x()
Dim TR As Long
TR = Cells(Rows.Count, "I").End(xlUp).Row
Range("L2:L" & TR) = Evaluate("IF(ISNUMBER(SEARCH(""MR"",I2:I" & TR & ")),""Dear Sir"","""")")
Dim SS As Long
SS = Cells(Rows.Count, "L").End(xlUp).Row
Range("S2:S" & SS) = Evaluate("IF(ISNUMBER(SEARCH(""Dear Sir"",L2:L" & SS & ")),""your banking facility"","""")")
End Sub
What i want is
if in column I there are Mr and Mrs then column L= Dear Sir/Madam. and if L= Dear Sir/Madam then Column S= your banking facilities.
With Mr its works well.
Thanks for your help
regards
rakesh