troubleshooting Question

Excel VBA - add column headers to concatenated strings

Avatar of billb1057
billb1057Flag for United States of America asked on
Microsoft Excel
8 Comments2 Solutions664 ViewsLast Modified:
The attached file has some nice code which gets the values of several columns and concatenates them into a single string in one column.
Now I cannot figure out how to add the column header before each value.
What this would to is identify each value from the field it came from.  So, right now, each concatenated value is separated by a "|" pipe character.  What I'd like to do is add the column (| Q2-comment - text ... | Q3-comment - text etc.)
What I tried was an additional For each loop which just got the headers on the source page (row one, every column), and then just adding that as a Sheet.Cell.Value at the beginning.
That might work in theory, but as far as syntax, logical order and program flow -- I have no idea why it didn't work.
Thanks for your help.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros