ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find next NOT empty cell in column (https://www.excelbanter.com/excel-programming/394086-find-next-not-empty-cell-column.html)

Max Bialystock[_2_]

find next NOT empty cell in column
 
How can I find the next not empty cell in column A?


Bernie Deitrick

find next NOT empty cell in column
 
Max,

A lot depends on what you consider "Blank"

With the activecell in column A:

If Intersect(ActiveCell.Offset(1, 0), _
ActiveCell.EntireColumn.SpecialCells(xlCellTypeBla nks)) Is Nothing Then
ActiveCell.Offset(1, 0).Select
Else
If ActiveCell.End(xlDown).Row < Rows.Count Then
ActiveCell.End(xlDown).Select
End If
End If

This can be re-written for use with a range object so that selecting a cell isn't needed...

HTH,
Bernie
MS Excel MVP


"Max Bialystock" wrote in message
...
How can I find the next not empty cell in column A?




Max Bialystock[_2_]

find next NOT empty cell in column
 
Bernie,

I just tested it and that's exactly what I needed.
I can't thank you enough for your help.

Max


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Max,

A lot depends on what you consider "Blank"

With the activecell in column A:

If Intersect(ActiveCell.Offset(1, 0), _
ActiveCell.EntireColumn.SpecialCells(xlCellTypeBla nks)) Is
Nothing Then
ActiveCell.Offset(1, 0).Select
Else
If ActiveCell.End(xlDown).Row < Rows.Count Then
ActiveCell.End(xlDown).Select
End If
End If

This can be re-written for use with a range object so that selecting a
cell isn't needed...

HTH,
Bernie
MS Excel MVP


"Max Bialystock" wrote in message
...
How can I find the next not empty cell in column A?






All times are GMT +1. The time now is 11:49 AM.

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