View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Randy Reese Randy Reese is offline
external usenet poster
 
Posts: 14
Default if column I is blank, then puts an "a" in column A.

This puts a's all the way to row 500. My test data goes to row 171.

"Tim Zych" wrote in message
...
Sub PutA()
Dim rng As Range, cell As Range
Set rng = Application.Intersect( _
Range("I2:I65536"), ActiveSheet.UsedRange)
If Not rng Is Nothing Then
For Each cell In rng.Cells
If Len(cell.Value) = 0 Then
Cells(cell.Row, "A").Value = "a"
End If
Next cell
End If
End Sub


"Randy Reese" wrote in message
link.net...
I need code that if column I ,starting with row 2 (with unknown number

of
rows) is blank, then puts an a in column A.