Autofill Dynamic Range

F

Fester

I'm creating a Unique filter of users starting from I11. This list
can be from 1-20. In J11, I'm creating a average time spent for each
user.

How do I create an autofill range that only fills as long as the
Unique filter range?

I know I could use Range("J11:J" & counta(I11:I30).FillDown, but
that's not working. How do I tell it to start in cell j11 and count
down the number of cells filled in range I11:I30?

Thank you in advance for any help.

Brendon
 
D

Dave Peterson

Maybe...

Range("J11:J" & (11 + counta(I11:I30) - 1)

If there's nothing else in column J, I like to use:

dim myRng as range
set myrng = .range("J11:J" & .cells(.rows.count,"I").end(xlup).row)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top