LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy pasting a range in to a single column

Worksheets("2") refers to a sheet that has a tab name of 2

worksheets(2) refers to the sheet that is second in the tab order

the code name has nothing to do with either of these and does not work with
the Worksheets collection.

code name is an alternate way to refer to a worksheet

Sheet1.Range("a1").Value = 3

If you look in the project explorer (in the VBE) you will see entries like

sheet1 (Jobs)

Jobs is the tab name of the worksheets and is used with the worksheets
collection. Sheet1 is the code name.

When you first open a workbook the code name and tab name probably will
match. (they do in US English anyway).

--
Regards,
Tom Ogilvy

"Hari Prasadh" wrote in message
...
Hi RBS,

Thnx for your code.

Just a ..Presently your code is copying data only up to the column based

on
row number 2's non empty column. So, if I have data till column Q for row
number 2 and if any of the rest of the rows I have data beyond column Q ,
then data till column Q only is considered. Also the macro is copying
entries column wise.. That is all the non-empty entries in column O, then

P
and so on. In the present case I prefer a row wise copying macro, which

Nick
has provided.

One syntax related doubts in your code. You have used -- With

Sheets(2) --
in your code. I have never come across a numeral within sheets(), I have
seen it to be a string or a string surrounded by quotations. Is this 2

same
as the code name reference used by Excel (I first came across this code

name
reference , yesterday, while browsing through one of J Peltier's article).
Is there some source where I may read a little bit about what this code

name
is about.

Thanks a lot,
Hari
India






 
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
How do I prevent copy and pasting into a selected range of a works oasalako1 Excel Discussion (Misc queries) 1 November 20th 07 01:29 PM
Copy Range From Multiple Worksheets to a Single Worksheet Dauntless1 Excel Discussion (Misc queries) 5 August 17th 07 01:59 AM
Copy column range of "single word" cells with spaces to a single c nastech Excel Discussion (Misc queries) 3 February 15th 06 05:04 PM
copy and pasting a find all list into another column Ben Excel Discussion (Misc queries) 18 December 31st 05 10:51 PM
How to I copy text from a range of cells to another single cell? WRT Excel Discussion (Misc queries) 2 December 18th 05 06:17 AM


All times are GMT +1. The time now is 04:52 AM.

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"