Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a worksheet with 24 columns and 940 rows. I need the ability to
occasionally insert a new row at various spots in the worksheet. So what I need is something which will insert 1 row at the point the curser is located, maintaining the same formats as the cells above. Additionally it needs to copy the formulas in column A, Y and Z. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Patrick
See David's page http://www.mvps.org/dmcritchie/excel/insrtrow.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Patrick C. Simonds" wrote in message ... I have a worksheet with 24 columns and 940 rows. I need the ability to occasionally insert a new row at various spots in the worksheet. So what I need is something which will insert 1 row at the point the curser is located, maintaining the same formats as the cells above. Additionally it needs to copy the formulas in column A, Y and Z. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
just do this:
Sub AddARowWithFormulas() Rows(Selection.Row).Insert Shift:=xlDown Rows(Selection.Row).Formula = Rows(Selection.Row - 1).Formula End Sub It is an interesting macro because we did not use a single variable. "Ron de Bruin" wrote: Hi Patrick See David's page http://www.mvps.org/dmcritchie/excel/insrtrow.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Patrick C. Simonds" wrote in message ... I have a worksheet with 24 columns and 940 rows. I need the ability to occasionally insert a new row at various spots in the worksheet. So what I need is something which will insert 1 row at the point the curser is located, maintaining the same formats as the cells above. Additionally it needs to copy the formulas in column A, Y and Z. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
filo, anything simple for added a row and copy the format 1 cell above? Also,
this will be a command button and the row to be inserted will start on D34 or Row 34 and then if they wanted to add more rows, they just click on the command button again and it will add the new row down from 34. Thanks "filo666" wrote: just do this: Sub AddARowWithFormulas() Rows(Selection.Row).Insert Shift:=xlDown Rows(Selection.Row).Formula = Rows(Selection.Row - 1).Formula End Sub It is an interesting macro because we did not use a single variable. "Ron de Bruin" wrote: Hi Patrick See David's page http://www.mvps.org/dmcritchie/excel/insrtrow.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Patrick C. Simonds" wrote in message ... I have a worksheet with 24 columns and 940 rows. I need the ability to occasionally insert a new row at various spots in the worksheet. So what I need is something which will insert 1 row at the point the curser is located, maintaining the same formats as the cells above. Additionally it needs to copy the formulas in column A, Y and Z. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Inserting? | Excel Discussion (Misc queries) | |||
inserting zero | Excel Discussion (Misc queries) | |||
inserting zero | Excel Worksheet Functions | |||
Inserting a row | Excel Programming | |||
Inserting a row below | Excel Discussion (Misc queries) |