Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active cells in column D 1

Status
Not open for further replies.

Ramy27

Technical User
Apr 26, 2005
63
GB
To count occupied cells in column D
j = wb.Sheets("Job codes").WorksheetFunction.CountA(D:D)

doesn't work. What correction is needed here?

---------------------------------
Your help is much appreciated, R.
---------------------------------
 
And this ?
Set myRange = wb.Sheets("Job codes").Range("D:D")
j = WorksheetFunction.CountA(myRange)


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Yes, it does. Thanks. I don't know how you managed to learn all these!! Well done.

---------------------------------
Your help is much appreciated, R.
---------------------------------
 
I don't know how you managed to learn all these
I only play with the F2 and F1 keys in VBE ...
 
Like we have:
Set myRange = wb.Sheets("Job codes").Range("D:D")
j = WorksheetFunction.CountA(myRange)
in the above post,

is there a way to count occupied ROWS - considering columns A, C and D (for example)

i.e, if column A, C or D has any data in it then count that row...

---------------------------------
Your help is much appreciated, R.
---------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top