Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JRM JRM is offline
external usenet poster
 
Posts: 1
Default Copy cells with unspecified values to new sheet

I need to write a macro (or ? VBA) to look at a column of numbers an
copy each different number to another sheet.
eg. Sheet1 Col A : contains
12345
12345
12345
67890
67890
88741
88741
88741

I need to copy 12345 to Sheet2 A:1
then find the next number eg. 67890 & copy to A:2
then 88741 to A:3
etc. etc down sheet1 until a blank cell is found.

Any help gratefully received as I'm very new to VBA's but reasonably O
with simple macros!
Thanks
Joh

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Copy cells with unspecified values to new sheet

No macro needed.
DataFilterAdvancedFilter

Check copy to another location, check unique records only, specify the
copy to range, click OK.
JRM < wrote:
I need to write a macro (or ? VBA) to look at a column of numbers and
copy each different number to another sheet.
eg. Sheet1 Col A : contains
12345
12345
12345
67890
67890
88741
88741
88741

I need to copy 12345 to Sheet2 A:1
then find the next number eg. 67890 & copy to A:2
then 88741 to A:3
etc. etc down sheet1 until a blank cell is found.

Any help gratefully received as I'm very new to VBA's but reasonably OK
with simple macros!
Thanks
John


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Copy cells with unspecified values to new sheet

Hi
one way:
- select your source data
- goto 'Data - Filter - Adavnced Filter'
- choose a seperate range as target and check 'unique
values'

-----Original Message-----
I need to write a macro (or ? VBA) to look at a column

of numbers and
copy each different number to another sheet.
eg. Sheet1 Col A : contains
12345
12345
12345
67890
67890
88741
88741
88741

I need to copy 12345 to Sheet2 A:1
then find the next number eg. 67890 & copy to A:2
then 88741 to A:3
etc. etc down sheet1 until a blank cell is found.

Any help gratefully received as I'm very new to VBA's but

reasonably OK
with simple macros!
Thanks
John


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
JRM JRM is offline
external usenet poster
 
Posts: 1
Default Copy cells with unspecified values to new sheet

Many thanks - works great - except it says you can only filter to the
active worksheet - buts thats no problem I can easily cut & paste to
where I actually want it.

Great site - great help - "I'll be back"!!
John


---
Message posted from http://www.ExcelForum.com/

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
Copy Sheet to new Sheet and clear cells on original sheets Boiler-Todd Excel Discussion (Misc queries) 7 September 23rd 09 10:02 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
copy values generated by conditional formula in one sheet to the other work sheet as values ramana Excel Worksheet Functions 1 October 5th 05 01:04 PM
copy values generated by conditional formula in one sheet to the other work sheet as values bobby Excel Discussion (Misc queries) 1 October 5th 05 12:18 PM
How do i compare values from two sheet and copy & paste if values match? rozb Excel Programming 0 March 5th 04 12:06 AM


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