Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
My table has data from coluum A to W. I would like to duplicate the data in coluum A to H. Each new row will be right below the original one. Then the new rows will be hightlighted from coluum A to W. I appreciate your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe this'll get you started:
Option Explicit Sub testme01() Dim iRow As Long Dim FirstRow As Long Dim LastRow As Long Dim wks As Worksheet Set wks = Worksheets("sheet1") With wks FirstRow = 2 'headers in row 1? LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For iRow = LastRow To FirstRow Step -1 .Rows(iRow + 1).Insert .Cells(iRow, "A").Range("a1:h1").Copy _ Destination:=.Cells(iRow + 1, "A") .Cells(iRow + 1, "A").Range("a1:w1").Interior.ColorIndex = 3 Next iRow End With End Sub ryanp wrote: Hi, My table has data from coluum A to W. I would like to duplicate the data in coluum A to H. Each new row will be right below the original one. Then the new rows will be hightlighted from coluum A to W. I appreciate your help. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
more rows highlight than I want | Excel Discussion (Misc queries) | |||
Creating a macro to dulicate the same information from a different | Excel Discussion (Misc queries) | |||
Highlight rows | Excel Worksheet Functions | |||
How do I identify dulicate rows in a spreadsheet? | Excel Discussion (Misc queries) | |||
Highlight rows | Excel Programming |