Hello,
Looking for a formula that will look at column 1 and combine the items that match into one column separating details by a comma.
I've attached a sample excel workbook. Any assistance would be appreciated.
sample-excel.xlsx
Hello,
Looking for a formula that will look at column 1 and combine the items that match into one column separating details by a comma.
I've attached a sample excel workbook. Any assistance would be appreciated.
sample-excel.xlsx
You will need a user-defined function for this.
Hit Alt+F11 and go to Insert|Module... then paste this code in the editor:
Then in the spreadsheet in B2 enter formula:![]()
Please Login or Register to view this content.
=IF(A2="","",SUBSTITUTE(TRIM(aconcat(IF(samplecontent!$A$2:$A$9=A2,samplecontent!$B$2:$B$9," ")))," ",","))
and confirm it with CTRL+SHIFT+ENTER not just ENTER so that { } brackets appear around the formula... then copy down
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
You can put this in the result content worksheet code module (right click the worksheet tab and choose view code)Now when an entry is made in column A of that sheet the result will be filled in!![]()
Please Login or Register to view this content.
Google Me
Find me located here Simon Lloyd and what i'm about Here
The above is NOT a link to a forum so is NOT against Rule 13
Last edited by Simon Lloyd; 02-02-2012 at 09:04 AM. Reason: missed a line out of code!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks