Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying Cell Value


Hi,

Does anyone have any suggestions for the following:

On Workbook 1, Sheet One has approximately 50 rows of data. The data
is in Column C and has about 10 different #'s (The other 40 cells in
Column C contain duplicates).

I would like a code that would look at column C in workbook one and
copy each number that is not a duplicate to a different sheet in
Workbook two (Cell B2).

For example Column C Workbook One contains the following non-duplicate
#'s
10, 20, 30 (All other #'s in Column C are duplicates). I would like
the Code to post the #'s in Workbook two as follows:

Workbook Two(Cell B2):

Sheet1 - 10
Sheet2 - 20
Sheet3 - 30

Any help would be greatly appreciated.

Thanks


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=484890

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying Cell Value

Dim nodupes as New Collection
Dim itm as Variant
Dim rng as Range
Dim i as Long
Dim cell as Range
with Workbooks("Workbook1.xls").Worksheets("Sheet One")
set rng = .range(.cells(2,1),.cells(2,1).end(xldown))
End with

On error resume next
for each cell in rng
nodupes.add cell.Value, cell.Text
next
On Error goto 0

set bk = Workbooks("Workbook2.xls")
i = 1
for each itm in nodupes
bk.worksheets(i).Range("A1").Value = itm
i = i + 1
Next

--
Regards,
Tom Oilvy


"STEVEB" wrote in
message ...

Hi,

Does anyone have any suggestions for the following:

On Workbook 1, Sheet One has approximately 50 rows of data. The data
is in Column C and has about 10 different #'s (The other 40 cells in
Column C contain duplicates).

I would like a code that would look at column C in workbook one and
copy each number that is not a duplicate to a different sheet in
Workbook two (Cell B2).

For example Column C Workbook One contains the following non-duplicate
#'s
10, 20, 30 (All other #'s in Column C are duplicates). I would like
the Code to post the #'s in Workbook two as follows:

Workbook Two(Cell B2):

Sheet1 - 10
Sheet2 - 20
Sheet3 - 30

Any help would be greatly appreciated.

Thanks


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile:

http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=484890



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 cell contents from many cells and pasting into one cell MDN Excel Discussion (Misc queries) 7 December 10th 07 08:56 PM
When copying a cell to another cell the information is duplicated. sicap Excel Worksheet Functions 0 December 30th 05 08:03 PM
Copying format to a new cell, w/o overwriting destination cell contents James C Excel Discussion (Misc queries) 1 October 18th 05 08:02 PM
copying the function contained within a cell to anouther cell. DMB Excel Worksheet Functions 2 September 1st 05 05:49 PM
Copying data down to next dirty cell, then copying that data slarson Excel Programming 0 September 15th 03 09:19 PM


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