Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Copying different cells from one list to another

If anyone can advise me I would greatly appreciate your help.

I have to take individual number from a large list and put them into a
smaller list of their own.

I can highlight my list but when I go to copy them I get the message:

'That command cannot be used on multiple selections'

There must be a way to do this rather than individually copy and paste each
number right?

Many thanks in advance!
Jackie
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Copying different cells from one list to another



"Imabrit" wrote:

If anyone can advise me I would greatly appreciate your help.

I have to take individual number from a large list and put them into a
smaller list of their own.

I can highlight my list but when I go to copy them I get the message:

'That command cannot be used on multiple selections'

There must be a way to do this rather than individually copy and paste each
number right?

Many thanks in advance!
Jackie


I'm afraid not, Excel will not copy more than one range. However you can get
around this with VBA (A MAcro).

The cells in the first column below were selected (ctrl + click) and
importantly the first cell in the destination column. Then the macro placed
the selected values into a list beginning with that empty cell.

a1 a1
a2 a3
a3 a5
a4 a7
a5
a6
a7

the macro is

Sub CopyCellsToList()
Dim c, mystr As String, count As Integer
Dim row As Long, i As Long, col As Integer, data
count = 0
'The active cell is the last cell selected
row = ActiveCell.row
col = ActiveCell.Column
'Get the data to copy
For Each c In Selection
If count = 0 Then
mystr = c & ","
ElseIf IsEmpty(c) Then
mystr = mystr
Else
mystr = mystr & c & ","
End If
count = count + 1
Next
'write the data
data = Split(mystr, ",")
For i = LBound(data) To UBound(data)
Cells(row, col) = data(i)
row = row + 1
Next i

End Sub

Press ALT + F11 keys to open the VB Editor. Choose Insert, Module and paste
in the code.

Return to your sheet and select the cells including the destination cell and
run the code. Perss ALT + F8 keys select the macro and choose Run.

Regards
Peter
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Copying different cells from one list to another

Hey Peter:

Guess what...I've been playing around with this and if you hold down CTRL
button on the first number of the 'main' list of numbers BUT DON'T CLICK ON
THE FIRST CELL you can pick up THAT cell and others that are needed...then
right click, copy and paste...it works!! Eureka!

Thanks anyway darlin'
Much appreciated.

"Imabrit" wrote:

If anyone can advise me I would greatly appreciate your help.

I have to take individual number from a large list and put them into a
smaller list of their own.

I can highlight my list but when I go to copy them I get the message:

'That command cannot be used on multiple selections'

There must be a way to do this rather than individually copy and paste each
number right?

Many thanks in advance!
Jackie

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Copying different cells from one list to another

Yeah!!

I realised that myself later - I feel such an idiot -Dooh!


"Imabrit" wrote:

Hey Peter:

Guess what...I've been playing around with this and if you hold down CTRL
button on the first number of the 'main' list of numbers BUT DON'T CLICK ON
THE FIRST CELL you can pick up THAT cell and others that are needed...then
right click, copy and paste...it works!! Eureka!

Thanks anyway darlin'
Much appreciated.

"Imabrit" wrote:

If anyone can advise me I would greatly appreciate your help.

I have to take individual number from a large list and put them into a
smaller list of their own.

I can highlight my list but when I go to copy them I get the message:

'That command cannot be used on multiple selections'

There must be a way to do this rather than individually copy and paste each
number right?

Many thanks in advance!
Jackie

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
copying data from a list Mark R Excel Discussion (Misc queries) 5 July 31st 07 12:56 AM
Copying to an autofiltered list Phil Excel Discussion (Misc queries) 3 June 30th 05 02:08 PM
How do I skip blank cells when copying over a range of cells? tawells Excel Discussion (Misc queries) 2 June 7th 05 09:36 PM
Copying list-box control Excel Discussion (Misc queries) 1 January 6th 05 01:39 AM
Copying from list Mortthesport Excel Worksheet Functions 1 November 27th 04 07:24 PM


All times are GMT +1. The time now is 12:01 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"