Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49916

Find Cell Address of Last Row

$
0
0
Hi! This is my first VBA attempt. Am using macro recorder to learn some of the basic coding, but can't figure out how to get back the address of a selected cell.

My application is a running inventory/production sheet that instantiates a new set of columns for each day of a production week. New rows may be added any day so the array depth changes. I am able to select and copy the desired columns using the macro recorder. Since I have one column that is fully populated, I can use xlDown to make the proper array selection for copying.

I now have to clear the contents of certain columns that are sparely populated. I figure an easy way to do this is using a FOR loop down the desired column until I reach the bottom row. I can know the bottom row if I can capture the row number from "Selection.End(xlDown).Select" on the fully populated column.

What is the VBA way to get the row number of this selected cell?

Viewing all articles
Browse latest Browse all 49916

Trending Articles