Row and column count last occupied cells in range

T

T2B

In VBA for a named range, I need to return:

row count, last occupied cell
column count, last occupied cell

Thanks.
 
I

isabelle

hi,

rw = Evaluate("MAX(IF(" & [rng].Address & "<>"""",row(" & [rng].Address & ")))")
cmn = Evaluate("MAX(IF(" & [rng].Address & "<>"""",column(" & [rng].Address & ")))")


--
isabelle



Le 2012-04-28 08:21, T2B a écrit :
 
T

TG

r = activesheet.usedrange,row
c = activesheet.usedrange.column

/Tommy

hi,

rw = Evaluate("MAX(IF(" & [rng].Address & "<>"""",row(" & [rng].Address& ")))")
cmn = Evaluate("MAX(IF(" & [rng].Address & "<>"""",column(" & [rng].Address & ")))")

--
isabelle

Le 2012-04-28 08:21, T2B a écrit :






In VBA for a named range, I need to return:
row count, last occupied cell
column count, last occupied cell
 

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