VBA help Range Count

J

jlclyde

I have a range that keeps changing and I need to count how many are in
this range. I copy and past information from one workbook to
another. I delete rows that are not needed and then I need a count of
how many rows are left. Any help would be greatly appreciated.

Thanks,
Jay
 
J

jlclyde

I have a range that keeps changing and I need to count how many are in
this range. I copy and past information from one workbook to
another. I delete rows that are not needed and then I need a count of
how many rows are left. Any help would be greatly appreciated.

Thanks,
Jay

Nevermind I have made a workaround. I am just telling my variable to
always equal 20. It will overwrite itself the next time the macro is
ran.
Jay
 
D

Don Guillett

And you want to count from where____? to where________?
1st row to last row in column?
 
B

Bob Phillips

Assuning that the range is allocatedc to the object rng, it is simply

rng.Rows.Count

If you need to find where the end is

range(range("A1"),Range("A1").End(xlDown)).Rows.Count



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

jlclyde

And you want to count from where____? to where________?
1st row to last row in column?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software






- Show quoted text -

I got it thanks though. I used a set number. It will never be more
then 20 so i set it at 20. It will copy over the unneeded rows
everytime the macro is run.
Jay
 
Top