Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 97
Default Macro to autofill from a specific row to a specific row

I need a macro to autofill formulas in row B4:K4 down stopping at B12:K12
depending upon if data exists in Cells A4 to A12. Row 13 (A13:K13) contains
totals so I do not want it to autofill past row 12. Can someone help?

Thanks in advance,
Joe M.
  #2   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default Macro to autofill from a specific row to a specific row

hi, i just posted after you, am using a macro to do much same you asked but
not sure if what you want. this should work for multiple columns where cells
have formula's (am not able to do formats to columns, without formula's in
them with this)
so three examples for paste: E: formula, F: format, P: all.. a
(not sure if wrote this all correctly, can't see all in this little box
they give ya..)


0) make a permanent cell where ref to last row "formula" can be placed to
designate last row: (cell: C4 used in macros below, change accordingly)
=ROW($A$2000)

also make a shortcut in your menubar:
rightclick menubar, custom, page-down left macros to: web, pull copy of:
open hyperlink to menubar / right click it and rename, eg: &F
rightclick that shortcut again, assign macro, choose item from below macros..

1) copy cell or cells you want to paste
2) select top row where you to paste from
3) hit: Alt & E to use shortcut from menubar

Sub PastecellE() 'alt-E (paste cell EQ/ Formula to col)
r = ActiveCell.Row 'row
c = ActiveCell.Column 'cell
LastRow = Range("C4").Value

For Each c In Range(Cells(r, c), Cells(LastRow, c))
If Cells(c.Row, "A").Value < "." Then
c.Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End If
Next c
End Sub


Sub PastecellF() 'alt-F (paste cell Format to col)
r = ActiveCell.Row
c = ActiveCell.Column
LastRow = Range("C4").Value

For Each c In Range(Cells(r, c), Cells(LastRow, c))
If Cells(c.Row, "A").Value < "." Then
c.Select

Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End If
Next c
End Sub


Sub PastecellP() 'alt-P (paste cell All to col)
r = ActiveCell.Row
c = ActiveCell.Column
LastRow = Range("C4").Value

For Each c In Range(Cells(r, c), Cells(LastRow, c))
If Cells(c.Row, "A").Value < "." Then
c.Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End If
Next c
End Sub



"Joe M." wrote:

I need a macro to autofill formulas in row B4:K4 down stopping at B12:K12
depending upon if data exists in Cells A4 to A12. Row 13 (A13:K13) contains
totals so I do not want it to autofill past row 12. Can someone help?

Thanks in advance,
Joe M.

  #3   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default Macro to autofill from a specific row to a specific row

there.. did make a mistake: your new menubar item should be:
right click menu bar, custom, page down left side to macros, grab copy of
"custom button" / smiley face to your tool bar, right click - modify same as
prev. post, thanks
(skip hyperlink thing)

"Joe M." wrote:

I need a macro to autofill formulas in row B4:K4 down stopping at B12:K12
depending upon if data exists in Cells A4 to A12. Row 13 (A13:K13) contains
totals so I do not want it to autofill past row 12. Can someone help?

Thanks in advance,
Joe M.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
specific macro on specific sheets Harshad[_2_] Excel Discussion (Misc queries) 5 October 20th 08 07:26 AM
Not allowing to continu unless a specific cell has specific answer madubois9 Excel Discussion (Misc queries) 3 October 25th 07 12:45 AM
Link to specific cell in specific Excel file JeroenM Excel Discussion (Misc queries) 3 July 6th 07 10:08 AM
Link from a specific Cell in Excel to a specific para. in Word CathyK Excel Worksheet Functions 0 August 10th 06 04:40 PM
Autofill data in specific blank cells Mr. G. Excel Worksheet Functions 0 April 22nd 05 09:41 PM


All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"