Row and column count last occupied cells in range

  • Thread starter Thread starter T2B
  • Start date Start date
T

T2B

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

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

Thanks.
 
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 :
 
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
 
Back
Top