ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find (https://www.excelbanter.com/excel-programming/376152-find.html)

Filips Benoit

Find
 
Dear All,

How can i find the columnnumber of the first empty cell starting from cell
M7

To be used in a loop. M is fix but 7 is variable.

Thank³

Filip



Jim Thomlinson

Find
 
You can try this. It heads left from column IV back until it runs into the
first populated cell and then move one column to the right...

dim lngLastColumn as long

lngLastColumn = cells(7, columns.count).end(xlToLeft).offset(0,1).Row

--
HTH...

Jim Thomlinson


"Filips Benoit" wrote:

Dear All,

How can i find the columnnumber of the first empty cell starting from cell
M7

To be used in a loop. M is fix but 7 is variable.

Thank³

Filip





All times are GMT +1. The time now is 09:09 PM.

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