Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Michael at Sigcon
 
Posts: n/a
Default What's the best way to add a row and copy formulas and formats?

I have a work sheet where I enter data into the first four cells of a row and
the rest of the cells in the row are formulas. Each row is formatted
differently. What's the best way to add a new row to the bottom and have all
the formatting and formulas of the row above it?
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default What's the best way to add a row and copy formulas and formats?

Here's a crude macro that will do it for you, copy your bottom row down to
the next blank row and delete the entries in the first four cells and place
the cursor in column A of that row to facilitate new data entry..........

Sub NewRow()
'
Range("A1").Select
Selection.End(xlDown).Select
Selection.EntireRow.Copy
Selection.Offset(1, 0).Select
ActiveSheet.Paste

Range("A1").Select
Selection.End(xlDown).Select
Selection.Value = ""
Selection.Offset(0, 1).Value = ""
Selection.Offset(0, 2).Value = ""
Selection.Offset(0, 3).Value = ""

Range("A1").Select
Selection.End(xlDown).Select
Selection.Offset(1, 0).Select

End Sub

hth
Vaya con Dios,
Chuck, CABGx3



"Michael at Sigcon" wrote:

I have a work sheet where I enter data into the first four cells of a row and
the rest of the cells in the row are formulas. Each row is formatted
differently. What's the best way to add a new row to the bottom and have all
the formatting and formulas of the row above it?

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



All times are GMT +1. The time now is 08:23 AM.

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

About Us

"It's about Microsoft Excel"