Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Shading multiple rows or, alternately, multiple columns only Lawrence Miller Excel Discussion (Misc queries) 5 December 1st 08 12:05 PM
Transposing multiple rows to multiple columns heyredone Excel Worksheet Functions 10 November 20th 08 08:36 PM
Excel Convert Multiple Rows into Multiple Columns [email protected] Excel Programming 5 June 29th 07 06:01 AM
Excel Convert Multiple Rows into Multiple Columns [email protected] Excel Worksheet Functions 1 June 28th 07 05:20 AM
selecting all blanks in multiple columns, then deleting those rows DSSdiva Excel Programming 6 May 12th 05 02:38 PM


All times are GMT +1. The time now is 07:09 PM.

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

About Us

"It's about Microsoft Excel"