VBA: Count Not Null

hamistasty

Board Regular
Joined
May 17, 2011
Messages
208
I'd like code to count the cells with values in them of Column A, row 9 downward of tab "schedule" and make that count a variable.

Something like:

Code:
Sheets("Schedule").Range("A" & Rows.Count).End(xlUp).Row

But starting at row 9 not 1, and assigned to a variable.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Code:
Dim x As Long
x = Application.WorksheetFunction.CountA(Sheets("Schedule").Range("A9:A" & Rows.Count))
 
Upvote 0
Thanks!

Using x now, how can I copy a row and insert that row below the original in Sheets("Index') x times?
 
Upvote 0

Forum statistics

Threads
1,224,557
Messages
6,179,510
Members
452,918
Latest member
Davion615

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