Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Strange Range copying

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)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Strange Range copying

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Strange Range copying

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
.

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
Strange thing when copying a range !! JLGWhiz[_2_] Excel Programming 2 December 16th 09 04:14 AM
Strange thing when copying a range !! Luc[_7_] Excel Programming 0 December 15th 09 04:23 PM
VLOOKUP formula results strange after copying down Code Numpty Excel Worksheet Functions 6 July 31st 08 12:18 AM
Strange Occurrence Copying Formula jcoleman52 Excel Discussion (Misc queries) 3 April 24th 06 09:08 PM
Strange conditional copying of spread sheet?? SaintJ Excel Programming 3 October 10th 05 03:32 PM


All times are GMT +1. The time now is 02:23 AM.

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

About Us

"It's about Microsoft Excel"