Hi. I want to ask one problem,
I have one column which is column "M".
If there are any blank cell in column "M", then it will replace with "MPTV".
So, it will loop start from row 2 until lastrow.
here is coding vba that I've try but cannot.
Please help me. thanks all
I have one column which is column "M".
If there are any blank cell in column "M", then it will replace with "MPTV".
So, it will loop start from row 2 until lastrow.
here is coding vba that I've try but cannot.
Code:
Sub REPLACEBLANK()
'replace Blank to MPTV
'in column M (SLoc column)
Lastrow1 = Range("M" & Rows.Count).End(xlUp).Row
Columns("M", Rows.Count).End(xlUp).Replace what:=Null, _
replacement:="MPTV", _
lookat:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False, _
SearchFormat:=False, _
ReplaceFormat:=False
End Sub
Please help me. thanks all