What's the best way to add a row and copy formulas and formats? in Excel General Questions  
 |  Edit my Profile  |  Help
 
     
  
 
 
 
Michael at Sigcon 3/17/2006 7:14 AM PST
  Question
  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?
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
CLR 3/17/2006 7:43 AM PST
  Answer
  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?
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
  Return to Microsoft Communities  Notify me of replies