Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Inserting a row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick C. Simonds - 23 Jan 2008 02:09 GMT
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.
Ron de Bruin - 23 Jan 2008 09:40 GMT
Hi Patrick

See David's page
http://www.mvps.org/dmcritchie/excel/insrtrow.htm

Signature

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

>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.
filo666 - 23 Jan 2008 09:48 GMT
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.

> Hi Patrick
>
[quoted text clipped - 7 lines]
> > is located, maintaining the same formats as the cells above. Additionally it
> > needs to copy the formulas in column A, Y and Z.
pgarcia - 29 Jan 2008 21:05 GMT
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

> just do this:
>
[quoted text clipped - 16 lines]
> > > is located, maintaining the same formats as the cells above. Additionally it
> > > needs to copy the formulas in column A, Y and Z.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.