Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Multiple columns with multiple rows
I am trying to do something like this:
for row=3 to 17 select columns A:F, row copy selection select another range on another worksheet paste what I copied too that range. next row I have been able to select one colun at a time, but can't select the whole range from A to F on the row I am on. Thanks. -- BillR |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Multiple columns with multiple rows
Simple Range("A3","F17") Range(range("A3"),range("F17")) Range(Range("A3"),cells(17,6)) Range(cells(3,1),cells(17,6)) -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=194340 http://www.thecodecage.com/forumz |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Multiple columns with multiple rows
I think I mislead you with the description of the problem. On sheet1 I want
to go from rows 3 to 17 one at a time. If cell D on that row is greater than 0, I want to copy A:F and paste it to A2 on sheet2. Then I want to insert a row on sheet2 to make room for the next copy. Then go back to sheet1 and use the next row to do it all over again until I get row 17 copied if D17 is greater than 0. Thanks for the help. -- BillR "joel" wrote: Simple Range("A3","F17") Range(range("A3"),range("F17")) Range(Range("A3"),cells(17,6)) Range(cells(3,1),cells(17,6)) -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=194340 http://www.thecodecage.com/forumz . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Multiple columns with multiple rows
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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 |