View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default Formula for Duplicating Rows!!


Try this user defined function

Function AccountNumber(Cell)
N = 1
Do While InStr(Cell.Offset(-N, 0).FormulaR1C1, "=") < 0
N = N + 1
Loop
AccountNumber = Cell.Offset(-N, 0).Value
End Function

If you put =AccountNumber(A2) in Cell A2 etc. you should get the value
of the first non formula cell in the upwards direction.


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=544422