Solved

Excel 2000 - Concatenate

Posted on 2011-03-18
10
223 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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
 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

820 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