Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a worksheet that contains two columns of data, I need a macro that
will write unique values from the source worksheet to an existing worksheet. The value is only considered to be unique if the combination of the two values does not already exist in the target worksheet. The macro should run each time the worksheet is opened. Any help is much appreciated. Regards, John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could load the concatenation of each pair of the existing values into a
collection, then go through the new data, and try to add the concatenated values to the collection. If you get an error, that row already exists. If not, then copy the data to the bottom of an existing sheet. You can see an example of using a collection to get a unique list at John Walkenbach's site. http://www.j-walk.com/ss/excel/tips/tip47.htm You should be able to adapt that to your situation. -- Regards, Tom Ogilvy "John_Carty" wrote in message ... I have a worksheet that contains two columns of data, I need a macro that will write unique values from the source worksheet to an existing worksheet. The value is only considered to be unique if the combination of the two values does not already exist in the target worksheet. The macro should run each time the worksheet is opened. Any help is much appreciated. Regards, John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unique Values, not Unique Records | Excel Discussion (Misc queries) | |||
Creating pick box with unique input values from a worksheet in the | Excel Programming | |||
VBA to write Unique Solutions ONLY? | Excel Programming | |||
Using VBA, how to write unique solutions only? | Excel Programming | |||
Extract unique values from worksheet into form | Excel Programming |