Find data in Column D, add L in Column A
Hi
try the following macro:
Sub process_rows()
Dim lastrow As Long
Dim row_index As Long
Application.ScreenUpdating = False
lastrow = ActiveSheet.Cells(Rows.Count, 4).End(xlUp).Row
For row_index = 1 to lastrow
If Cells(row_index, 4).Value <"" and _
cells(row_index,1).value="" then
cells(row_index,1).value="L"
End If
Next
Application.ScreenUpdating = True
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
"juan" schrieb im Newsbeitrag
...
Hello All,
I have a sheet that in Column A the default value will be
L for those rows that contain information. I'm creating a
macro so would like to put a code in there that will put
an L in Column A if there is data in Column D.
Example
Column A ColumnD
L MICROTEST
L LECTRATEST
L SAMPLE
Since total rows will change on a monthly basis I can't
have a specific range.
Would appreciate the help.
Thanks,
Juan
|