LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Combine data in rows based on two citeria

Copy your data to two worksheets.
Clean up the first like you did before.
Clean up the second using the same kind of technique--but this time use the
"other info" column as the secondary key (in descending order).

So the first sheet will look like (after I delete the other info column):

---A--- -B--- ---C-------- ------D-------
Company: City: Address: combination
Company1 City1 444 Broadway Company1…City1
Company1 City4 666 East Company1…City4
Company2 City2 333 Milburry Company2…City2
Company3 City3 111 West Company3…City3

The second sheet will look like (after I delete the Address column):

---A--- -B--- ---C-------- ------D-------
Company: City: Other Info: combined
Company1 City1 aabb Company1…City1
Company1 City4 ddxx Company1…City4
Company2 City2 ttyy Company2…City2
Company3 City3 ccdd Company3…City3

Now put this in E2 of sheet1:
=index(sheet2!c:c,match(d2,sheet2!d:d,0))
Then drag down the column

Convert to values (edit|copy, edit|paste special|Values)

And if you have an #n/a's, just do an Edit|Replace to get rid of them.




" wrote:
<<snipped

I guess I now I have a follow up question concerning this same topic.
What process could I take to attain a similar result as shown above
with more then three columns? For example.

Company: City: Address: Other Info:
Company1 City1 444 Broadway
Company2 City2 ttyy
Company2 City2 333 Milburry
Company1 City1 aabb
Company3 City3 111 West ccdd
Company1 City4 666 East ddxx

After:

Company: City: Address: Other Info:
Company1 City1 444 Broadway aabb
Company2 City2 333 Milburry ttyy
Company3 City3 111 West ccdd
Company1 City4 666 East ddxx


--

Dave Peterson
 
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
combine rows and sum data with the same id tenny Excel Discussion (Misc queries) 4 April 4th 23 02:14 PM
How to combine data based on two fields.. gambler1650 Excel Discussion (Misc queries) 1 May 4th 10 08:11 PM
combine 2 tables of data into one based on date Tim Nealon Excel Worksheet Functions 5 September 1st 06 01:42 AM
Combine data rows in Pie Chart Jayntree Charts and Charting in Excel 1 March 16th 06 09:15 AM
Macro to combine data based on IF,THENs? marlea[_3_] Excel Programming 3 September 15th 05 10:32 PM


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