user defined function which increase consecutively while passing below cells
hi Oercim,
Am Tue, 5 Mar 2013 03:54:27 -0800 (PST) schrieb oercim:
However, that does not work as I want. In active cell it works fine, but if I fetch the cell from it corner to below cell, it does not work. How can I do that? Thanks alot. That is important to me.
look that there is a empty cell above and try the macro:
Function myfunc(Optional rngC As Range) As Long
If rngC Is Nothing Then Set rngC = Application.Caller
myfunc = rngC.Offset(-1, 0) + 1
End Function
Better way:
Write 1 in the selected cell and drag it down with pressed CTRL-Button
Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
|