Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I don't know why you need to add a row on sheet2. I wrote two similar macros. the 1st doesn't add the row. The 2nd does insert a new row Destrow = 1 with Sheets("Sheet1") For RowCount = 3 to 17 Data = .range("D" & rowcount) if Data 0 then .Range("A" & RowCount & ":F" & Rowcount).copy _ Destination:=Sheets("Sheet2").range("A" & DestRow) DestRow = DestRow + 1 End if Next Rowcount end with 2nd macro Destrow = 2 with Sheets("Sheet1") For RowCount = 3 to 17 Data = .range("D" & rowcount) if Data 0 then Sheets("Sheet2").rows(RowCount + 1).Insert .Range("A" & RowCount & ":F" & Rowcount).copy _ Destination:=Sheets("Sheet2").range("A" & DestRow) DestRow = DestRow + 1 End if Next Rowcount end with 'Original Source: http://tinyurl.com/y84jecl -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=194340 http://www.thecodecage.com/forumz |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Shading multiple rows or, alternately, multiple columns only | Excel Discussion (Misc queries) | |||
Transposing multiple rows to multiple columns | Excel Worksheet Functions | |||
Excel Convert Multiple Rows into Multiple Columns | Excel Programming | |||
Excel Convert Multiple Rows into Multiple Columns | Excel Worksheet Functions | |||
selecting all blanks in multiple columns, then deleting those rows | Excel Programming |