ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cell-fill-macro again (https://www.excelbanter.com/excel-programming/307455-cell-fill-macro-again.html)

Andreas Aust

cell-fill-macro again
 
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


Tom Ogilvy schrieb:

Dim rng as Range
On error resume Next
set rng = columns(3).SpecialCells(xlblanks)
On Error goto 0
if not rng is nothing then
rng.Value = "this is an empty cell"
End if

--
Regards,
Tom Ogilvy

"Andreas Aust" wrote in message
...
Hi together,

I need a macro.

I have a column and in this columne there are some empty cells.
And in these cells I want fill with an expression like "this is an

empty
cell".

Do you have an idea how I can solve this problem?

Thank you in advance!

Regards Andi



Tom Ogilvy

cell-fill-macro again
 
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

--
Regards,
Tom Ogilvy



"Andreas Aust" wrote in message
...
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


Tom Ogilvy schrieb:

Dim rng as Range
On error resume Next
set rng = columns(3).SpecialCells(xlblanks)
On Error goto 0
if not rng is nothing then
rng.Value = "this is an empty cell"
End if

--
Regards,
Tom Ogilvy

"Andreas Aust" wrote in message
...
Hi together,

I need a macro.

I have a column and in this columne there are some empty cells.
And in these cells I want fill with an expression like "this is an

empty
cell".

Do you have an idea how I can solve this problem?

Thank you in advance!

Regards Andi






All times are GMT +1. The time now is 04:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com