From: David Macdonald on 5 Mar 2010 08:09 This copies the range once: Sheets("Sheet1").Range("B3:P3").Copy Sheets("Sheet3").Rows(8) This copies the range repeatedly to the end of the row: Sheets("Sheet1").Range("B3:Q3").Copy Sheets("Sheet3").Rows(8) Why? Is there a limit of 15 columns? -- WinXP - Office2003 (Italian)
From: Dave Peterson on 5 Mar 2010 09:04 First, I can't think a time where not specifying the entire range that I want pasted is a good idea. If I want it pasted just a single time, I'd use: Sheets("Sheet1").Range("B3:P3").Copy Sheets("Sheet3").Range("A8") or multiple times: Sheets("Sheet1").Range("B3:P3").Copy Sheets("Sheet3").Range("a9:ad9") ======= I don't think it's a limit in the number of columns. I think it's excel trying to help. Since B3:q3 is 16 columns and 16 is an integer divisor into the number of columns that xl2003 has (256), excel says: I know you want to fill the entire row--since you told me to! But B3:P3 is only 15 columns and 15 is not an integer divisor into 256, excel says: Well, I can't fill the row exactly, so I'll just do one. If you change your ranges to be 2 columns and 3 columns, you'll see the same thing happen. David Macdonald wrote: > > This copies the range once: > Sheets("Sheet1").Range("B3:P3").Copy Sheets("Sheet3").Rows(8) > > This copies the range repeatedly to the end of the row: > Sheets("Sheet1").Range("B3:Q3").Copy Sheets("Sheet3").Rows(8) > > Why? Is there a limit of 15 columns? > > -- > WinXP - Office2003 (Italian) -- Dave Peterson
From: David Macdonald on 9 Mar 2010 03:13 Damn you to hell Excel for being so helpful! -- WinXP - Office2003 (Italian) "Dave Peterson" wrote: > First, I can't think a time where not specifying the entire range that I want > pasted is a good idea. > If I want it pasted just a single time, I'd use: > Sheets("Sheet1").Range("B3:P3").Copy Sheets("Sheet3").Range("A8") > or multiple times: > Sheets("Sheet1").Range("B3:P3").Copy Sheets("Sheet3").Range("a9:ad9") > > ======= > I don't think it's a limit in the number of columns. I think it's excel trying > to help. > > Since B3:q3 is 16 columns and 16 is an integer divisor into the number of > columns that xl2003 has (256), excel says: I know you want to fill the entire > row--since you told me to! > > But B3:P3 is only 15 columns and 15 is not an integer divisor into 256, excel > says: Well, I can't fill the row exactly, so I'll just do one. > > If you change your ranges to be 2 columns and 3 columns, you'll see the same > thing happen. > > David Macdonald wrote: > > > > This copies the range once: > > Sheets("Sheet1").Range("B3:P3").Copy Sheets("Sheet3").Rows(8) > > > > This copies the range repeatedly to the end of the row: > > Sheets("Sheet1").Range("B3:Q3").Copy Sheets("Sheet3").Rows(8) > > > > Why? Is there a limit of 15 columns? > > > > -- > > WinXP - Office2003 (Italian) > > -- > > Dave Peterson > . >
|
Pages: 1 Prev: Check column header value Next: Month & Year Text to Date Format - Help Please |