View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.misc
David McRitchie David McRitchie is offline
external usenet poster
 
Posts: 903
Default how to insert rows by formula.

Hi Billy,
I was thinking along those lines of extending formulas down
a column as well, but the solution wanted turned out to be a
a formula to effect a transpose as Ron's answer was what the
poster wanted.


Anyway in your suggestion you do not want to hardcode 65536
for rows or for that matter 256 for columns, because sooner or
later it was going to get changed and Excel 2007 has changed that.

You might take a look at
http://www.mvps.org/dmcritchie/excel/insrtrow.htm
http://www.mvps.org/dmcritchie/excel/offset.htm
--
HTH,
David McRitchie, Microsoft MVP -- Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm


"Billy Liddel"
I just realised that if you are adding rows or already have run the macro to
get partial results then I should have rewritten the code. Ig note the one
above and use the following:

Sub InsertRow()
Dim c, d, nr As Long
'nr = Range("A1").CurrentRegion.Rows.Count
nr = Range("A65536").End(xlUp).Row