Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Any help with this solution would be greatly appreciated. I have two sheets (sheet1 and sheet2). In sheet1 one I do som filtering. Sheet2 looks like this: Priority1 Priority2 Priority3 Priority4 I would like to move the results(rows) from the filtered sheet1 an insert between Priority2 and Priority3, and push down the labe Priority3. Thanks in advace -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Tester1()
Dim rng As Range, rng1 As Range Dim rng2 As Range With Worksheets("Sheet1") Set rng = .AutoFilter.Range End With Set rng = rng.Offset(1, 0).Resize(rng.Rows.Count - 1) numRow = rng.Columns(1).SpecialCells(xlVisible).Count rng.Copy With Worksheets("Sheet2") Set rng1 = .Columns(1).Find("Priority3") End With If Not rng1 Is Nothing Then Set rng2 = rng1.Offset(-1, 0) rng1.EntireRow.Resize(numRow).Insert rng.Copy Worksheets("Sheet2").Paste rng2.Offset(1, 0) End If End Sub -- Regards, Tom Ogilvy "sk8rider " wrote in message ... Hello, Any help with this solution would be greatly appreciated. I have two sheets (sheet1 and sheet2). In sheet1 one I do some filtering. Sheet2 looks like this: Priority1 Priority2 Priority3 Priority4 I would like to move the results(rows) from the filtered sheet1 and insert between Priority2 and Priority3, and push down the label Priority3. Thanks in advace. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks a lot Tom your post helped me resolved my issue.
Take care -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding rows based on no of rows specified from a given position | Excel Worksheet Functions | |||
Adding five new rows every 40 rows in a spreadsheet? | Excel Discussion (Misc queries) | |||
Adding rows? | Excel Worksheet Functions | |||
Adding Rows offsets to working rows across two worksheets | Setting up and Configuration of Excel | |||
VBA - Adding Rows | Excel Programming |