|re: "amit pratap" |
For rw = 1 To Range("B" & Rows.Count).End(xlUp).Row
If Range("B" & rw) Like "*amit*" Then Range("C" & rw) = "rathore"
re: "but wht if i want to add it next column as well i.e column 4 instead of column 3."
You asked for Column 3. Are you now changing what you asked for?
What letter is associated with Column 2? What column letter is associated with Column 3? What column letter is associated with Column 4?
Look at the code. Try and see if you can modify the code to work with Column 4 instead of 3.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.