cell-fill-macro again

  • Thread starter Thread starter Andreas Aust
  • Start date Start date
A

Andreas Aust

Hi (especially Hi Tom),

one more question.

Is it possible too to define a dynamic lenght of the column? I know
exactly that the cell in the very last row of this column is not empty?
(I think about "UsedRange.Rows.Count")

Thank you in advance

Andi
 
Dim rng as Range, rng1 as Range
set rng = Range(cells(1,"G"),cells(rows.count,"G").End(xlup))
On error resume Next
set rng1 = rng.specialCells(xlBlanks)
On Error goto 0
if not rng1 is nothing then
rng1.Value = " this cell is empty"
End if


or

With worksheets(1)
set rng = Intersect(.columns(7),.UsedRange)
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top