Thread: Code Formula
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Nikki Nikki is offline
external usenet poster
 
Posts: 184
Default Code Formula

Thanks so much. One other question, if I wanted to copy say five rows down
and then use a sum formula that is directly to the left (copy preceeding cell
to the left), how could I incorporate this into this code. I could use the
same code and modify the formula but was hoping one line would give me what I
would need.

Thanks again.

"JBeaucaire" wrote:


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