View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.excel.worksheet.functions
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Q) Last row/column ------ excel formula query

Hi Harlan

This are useful functions


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Harlan Grove" wrote in message ...
"Ron de Bruin" wrote...
..
If your usedrange is bigger then your data on the sheet
the formula will not work correct(display 0).

..

That's just due to bugs in my lr and lc functions.

Function lr(Optional r As Range) As Variant

..
For i = n To 1 Step -1
Set c = ur.Cells(n, 1)

..

The Set statement should be

Set c = ur.Cells(i, 1)


Function lc(Optional r As Range) As Variant

..
For i = n To 1 Step -1
Set c = ur.Cells(1, i)

..

The Set statement should be

Set c = ur.Cells(1, i)

--
Never attach files.
Snip unnecessary quoted text.
Never multipost (though crossposting is usually OK).
Don't change subject lines because it corrupts Google newsgroup archives.