Hello,
I'm using Excel 2007 and am stuck.
I'm getting this out of a database from 2 tables, where I need to change it from 2 tables (ID's on one, and Reasons a differ. table), and combine it to 1 table where reason is now just another field but now the reasons are combined to one field rather than separate records. Since I can't get permission to create a new table and do the magic there with functions and strings, I'm forced to use excel.
I have something like the following:
ID Name Version Reason
1b Colgate 2.0 Whitener<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
2x Crest Alpha Branded<o
></o
>
1b Colgate 2.0 Tastes Good<o
></o
>
3x Sensadine 3 Gentle<o
></o
>
2x Crest Alpha Tastes Good<o
></o
>
1b Colgate 2.0 Colorful/Swirly
<o
></o
>
I need to compare the ID's, if they're the same, then concatenate the reason into a 5th column, separated by semi-colons, and finally delete all extraneous columns so it would look like:
ID Name Version Reasons <o
></o
>
1b Colgate 2.0 Whitener; Tastes Good; Colorful/Swirly<o
></o
>
2x Crest Alpha Branded; Tastes Good<o
></o
>
3x Sensadine 3 Gentle<o
></o
>
If the Reasons could be sorted, great, but that's just a want.
I should have added that a macro for this would be great! I'll need to tweak it for the multiple instances that it'll be used, but this alone will be huge!
Thanks.
I'm using Excel 2007 and am stuck.
I'm getting this out of a database from 2 tables, where I need to change it from 2 tables (ID's on one, and Reasons a differ. table), and combine it to 1 table where reason is now just another field but now the reasons are combined to one field rather than separate records. Since I can't get permission to create a new table and do the magic there with functions and strings, I'm forced to use excel.
I have something like the following:
ID Name Version Reason
1b Colgate 2.0 Whitener<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
2x Crest Alpha Branded<o
1b Colgate 2.0 Tastes Good<o
3x Sensadine 3 Gentle<o
2x Crest Alpha Tastes Good<o
1b Colgate 2.0 Colorful/Swirly
<o
I need to compare the ID's, if they're the same, then concatenate the reason into a 5th column, separated by semi-colons, and finally delete all extraneous columns so it would look like:
ID Name Version Reasons <o
1b Colgate 2.0 Whitener; Tastes Good; Colorful/Swirly<o
2x Crest Alpha Branded; Tastes Good<o
3x Sensadine 3 Gentle<o
If the Reasons could be sorted, great, but that's just a want.
I should have added that a macro for this would be great! I'll need to tweak it for the multiple instances that it'll be used, but this alone will be huge!
Thanks.
Last edited: