Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
specific macro on specific sheets | Excel Discussion (Misc queries) | |||
Not allowing to continu unless a specific cell has specific answer | Excel Discussion (Misc queries) | |||
Link to specific cell in specific Excel file | Excel Discussion (Misc queries) | |||
Link from a specific Cell in Excel to a specific para. in Word | Excel Worksheet Functions | |||
Autofill data in specific blank cells | Excel Worksheet Functions |