View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default ERROR 400 on identical codes different range

On Thursday, November 27, 2014 9:46:51 AM UTC-8, GS wrote:
Hi Garry,

Can you give me a simple example of how to use the function?

I start by copying to a standard module... then what do I do on the
sheet?

Howard


It's this simple...

Dim lLastRow&, lLastCol&, lNextRow&, lNextCol&

lLastRow = GetLastDataPos() 'to return row#
lLastCol = GetLastDataPos(IsRow:=False) 'to return col#

OR

LNextRow = GetLastDataPos() + 1
LNextCol = GetLastDataPos(IsRow:=False) + 1

..where any extra blank rows residual in UsedRange doesn't matter
because the function loops backwards until it finds a non-empty range.

--
Garry


Okay, thanks.

Off to play with it.

Howard