Excel - Row and column count last occupied cells in range

Asked By T2B on 28-Apr-12 08:21 AM
In VBA for a named range, I need to return:

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

Thanks.


isabelle replied to T2B on 28-Apr-12 10:11 AM
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 :
TG replied to isabelle on 30-Apr-12 04:31 PM
r =3D activesheet.usedrange,row
c =3D activesheet.usedrange.column

/Tommy

& ")))")
ress & ")))")