Selecting the first non-blank cell in a column

zakynthos

Board Regular
Joined
Mar 28, 2011
Messages
169
How would you write the VBA to:

1. find the first non-blank cell in a column (say Column A),
2. select it and
3. select all other not blank cells in columns to the right of A, say columns B to M?

Many thanks.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
It would be good to know what you intend to do with those cells once selected. In vba it is rarely required to actually select cells to work with them. In addition, selecting slows your code considerabley.

I also have some other questions:

1. Is it known if the first non-blank cell in column A is a constant? or a formula? or unknown?

2. Is it known if the non-blank cells in columns B:M of the row in question will all be constants/formulas/unknown?
 
Upvote 0
Many thanks for your reply.:)

The values in cells in Column A are 9 digit numbers.

Once 'selected' (or 'found' if you prefer), I want to copy the column of non- blank cells (they are ) and the linked rows of these cells in columns to the right

The non-blank cells in columns B:M of the row in question are all formulas, (mostly Vlookups and some conditional formulas) that link to another tab.

I will then want to paste the range found (example A200:M9000) to another tab,(called 'Inclusion list')
 
Upvote 0
Sorry, I'm afraid that I'm not really able to grasp just what you have or what you are trying to do.
 
Upvote 0
Thanks for your help - since I posted the question, I've thought of a simpler solution - but I really appreciate your suggestions because I can adapt the code for another part of the program I'm compiling:)
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top