LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Combining data from column while deleting duplicate rows

Hi,

I am struggling with a data set which is drawn from several different
sources and thus has a large amount of duplicated information. It's in
three columns, with the contents of first two columns usually being
duplicated (unless there's a typo or such) but the value in the third
column differing because it indicates the source of the data. There
are varying numbers of these rows from one (only coming from a single
data source) to eight (coming from all eight data sources). What I
want to do is to combine the data on a single row by looking row-by-
row at the first two columns. If they contain exactly the same values,
I'd like to combine them onto a single row, with the third and
subsequent columns in the row showing the data source information. If
they only come from one data source or the first two columns aren't
exact duplicates, I'd like them left as is. Can this be done with a
macro or some other way? I've done a good bit of searching but
couldn't find anything that exactly addressed my situation.

For example (with semi-colons being used to indicate columns, they
aren't actually in the data):
Group;Family;State
PD;Imaginaceae;NSW
PD;Imaginaceae;Qld
PD;Imaginaceae;WA
CL;Frustraceae;Qld
CP;Fakaceae;Qld
PG;Fakaceae;NT
PG;Furphyaceae;Qld
PG;Furphyaceae;WA

What I want it to look like is:
Group;Family;State1;State2;State3;...State8
PD;Imaginaceae;NSW;Qld;WA
CL;Frustraceae;Qld
CP;Fakaceae;Qld
PG;Fakaceae;NT
PG;Furphyaceae;Qld;WA

Do I need to sort the data alphabetically by say family and then group
for the macros to work, or can it be in any order throughout the file?
Additionally, some of the names are bolded and this means something,
so I'd rather not lose it. Also, I may at some future time want to add
other sources of data, so it would be great if there were comments or
something to indicate what if anything I'd need to change if I decide
to run this on such a file with more than eight possible rows... Don't
ask for much, do I? :D


Thanks very much for any help,
Michelle
 
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
Combining duplicate rows into one ceci Excel Discussion (Misc queries) 2 February 4th 09 02:42 AM
Deleting Duplicate Data in a Column. Greg New Users to Excel 7 July 3rd 08 06:58 PM
combining data from different rows into 1 column Jim Linnenburger Excel Discussion (Misc queries) 0 October 25th 07 05:26 PM
Removing duplicate rows and combining unique data [email protected] Excel Programming 2 May 19th 06 11:57 AM
combining duplicate rows jezzica85 Excel Discussion (Misc queries) 1 March 18th 06 02:30 PM


All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"