Thread: Code Formula
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Code Formula

I'm pretty sure this shorter macro will do the same thing your code does...

Sub Copy26Rows()
Selection.Copy Selection.Resize(26)
End Sub

--
Rick (MVP - Excel)


"JBeaucaire" wrote in message
...

Short and sweet, this code will copy the currently selected cell down to
a total of 26 rows, 25 copies.

Code:
--------------------
Sub Copy26Rows()
Selection.Copy
Range(Selection, Selection.Offset(25, 0)).PasteSpecial
(xlPasteFormulasAndNumberFormats)
Selection.End(xlDown).Select
Application.CutCopyMode = False
End Sub
--------------------


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile:
http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=45495