Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default Insert New Row

I would like to be able to insert a new row labelled 4-Independent after the
row that is labelled 3-SuperStore in Column "E"

--

Regards
Michael Koerner



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default Insert New Row

Forgot to add that I would also like whatever is in Columns A, B, C, and D
copied from the row above the new one copied into the new row. Hope this
makes sense

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
I would like to be able to insert a new row labelled 4-Independent after the
row that is labelled 3-SuperStore in Column "E"

--

Regards
Michael Koerner




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Insert New Row

Sub InsertAfterFindCopyRowAbove()
What = "3-SuperStore"
newtext = "4-Independent"
With Columns("e").Find(What, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
..Offset(1).EntireRow.Insert
..Offset(, -4).Resize(, 4).Copy .Offset(1, -4)
..Offset(1).Value = newtext
End With
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Michael Koerner" wrote in message
...
Forgot to add that I would also like whatever is in Columns A, B, C, and D
copied from the row above the new one copied into the new row. Hope this
makes sense

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
I would like to be able to insert a new row labelled 4-Independent after
the
row that is labelled 3-SuperStore in Column "E"

--

Regards
Michael Koerner





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default Insert New Row

Don;

Thanks very much. How do I make it go through the whole sheet 1400 rows and
make the change each time it hits 3-SuperStore?

--

Regards
Michael Koerner


"Don Guillett" wrote in message
...
Sub InsertAfterFindCopyRowAbove()
What = "3-SuperStore"
newtext = "4-Independent"
With Columns("e").Find(What, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
..Offset(1).EntireRow.Insert
..Offset(, -4).Resize(, 4).Copy .Offset(1, -4)
..Offset(1).Value = newtext
End With
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Michael Koerner" wrote in message
...
Forgot to add that I would also like whatever is in Columns A, B, C, and D
copied from the row above the new one copied into the new row. Hope this
makes sense

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
I would like to be able to insert a new row labelled 4-Independent after
the
row that is labelled 3-SuperStore in Column "E"

--

Regards
Michael Koerner






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Insert New Row

Sub InsertAfterFind()
What = "3-SuperStore"
newtext = "4-Independent"
With Columns("e").Find(What, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
..Offset(1).EntireRow.Insert
..Offset(1).Value = newtext
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Michael Koerner" wrote in message
...
I would like to be able to insert a new row labelled 4-Independent after
the
row that is labelled 3-SuperStore in Column "E"

--

Regards
Michael Koerner




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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot insert worksheet in exel - not available in insert menu pedro39 Excel Worksheet Functions 1 July 24th 08 12:09 PM
Insert new Worksheet with name, and insert the sheet into itsalphabetical / numerical location S Davis Excel Programming 0 May 12th 08 07:13 PM
Macro to insert copy and insert formulas only to next blank row bob Excel Programming 0 June 30th 06 12:02 PM
Insert Next? Or insert a variable number of records...how? Tom MacKay Excel Discussion (Misc queries) 0 April 20th 06 10:44 PM
Insert cell/format/text/fontsize and auto insert into header? Unfurltheflag Excel Programming 2 November 3rd 04 05:39 PM


All times are GMT +1. The time now is 07:01 AM.

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

About Us

"It's about Microsoft Excel"