Solved

Excel 2000 - Concatenate

Posted on 2011-03-18
10
220 Views
Last Modified: 2012-05-11
Dear Experts,

Could you please check the attached file on Sheet1, it is a pivot which counts which item is produced on which machines.

Is there possibility I thought maybe to a kind of vlookup combination, which in column F could list all the machines in one cell where an item is produced?

Basically if there is any non blank cell in the items row, that means that it is produced on that certain header

thanks,

ConcHeaders.xls
0
Comment
Question by:csehz
  • 5
  • 4
10 Comments
 
LVL 8

Expert Comment

by:ragnarok89
ID: 35165407
This is close...
Copy-of-ConcHeaders.xls
0
 
LVL 8

Expert Comment

by:ragnarok89
ID: 35165415
You could easily do this with a VB macro though, is this an option?
0
 
LVL 1

Author Comment

by:csehz
ID: 35165444
Would it be that easier? :-)

Yes sure could be an option I would be glad to use :-))

thanks in advance
0
 
LVL 1

Author Comment

by:csehz
ID: 35165499
Anyway I have checked your solution as Excel formula, as I can see in H-I-J columns you did row values from the headers, and concatenated those in K.

Finally yes it is also a kind of solution, so if in VBA would not be I am also okay with this.

Basically the base pivot comes from Access as crosstab query, and there originally I could list the Machine names so your H-I-J formula would not be needed.

Thanks for the idea :-)
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 250 total points
ID: 35165563
This formula in F2 copied down would get rid of unwanted commas

=SUBSTITUTE(IF(B2<>"",", "&B$1,"")&IF(C2<>"",", "&C$1,"")&IF(D2<>"",", "&D$1,"")&IF(E2<>"",", "&E$1,""),", ","",1)

....but clearly it's impractical for large numbers of columns.

regards, barry
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:csehz
ID: 35165652
Barry thanks, on my machine in formulas the , used to be as ; so applied like

=SUBSTITUTE(IF(B2<>"";", "&B$1;"")&IF(C2<>"";", "&C$1;"")&IF(D2<>"";", "&D$1;"")&IF(E2<>"";", "&E$1;"");", ";"";1)

But that works perfectly on the example.

In the real live file unfortunately there are 32 columns, but maybe I will try to list all of them
0
 
LVL 8

Accepted Solution

by:
ragnarok89 earned 250 total points
ID: 35165757
Here's a macro that will do it
Copy-of-ConcHeaders.xls
0
 
LVL 8

Expert Comment

by:ragnarok89
ID: 35165792
csehz,

   The macro will work for a table of any size, so long as there is a blank column immediately to the right of the table, and no blanks in Column A. You'll have to adjust the macro to put the results into the column of your choice, I used G.
0
 
LVL 1

Author Closing Comment

by:csehz
ID: 35165856
Thanks it works great :-)

Thanks very much the help both of you
0
 
LVL 1

Author Comment

by:csehz
ID: 35165868
Ragnarok89 yes in live I will have to modify but no problem with it the logic is good and works, thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now