Can I concatenate multiple results into 1 field?

bruty

Active Member
Joined
Jul 25, 2007
Messages
456
Office Version
  1. 365
Platform
  1. Windows
I have a table that looks similar to this:
ABCDEFGHI
Q_#Q_TextR_#R_Text+ve Score-ve Score+ve Text-ve Text
Q1I look forward to coming to work.
1​
Never
0​
1​
Never
Q1I look forward to coming to work.
2​
Rarely
0​
1​
Rarely
Q1I look forward to coming to work.
3​
Sometimes
0​
0​
Q1I look forward to coming to work.
4​
Often
1​
0​
Often
Q1I look forward to coming to work.
5​
Always
1​
0​
Always

In Column I I would like a concatenation of the text from Columns G & H, so ideally it will look like this in the end:
ABCDEFGHI
Q_#Q_TextR_#R_Text+ve Score-ve Score+ve Text-ve Text
Q1I look forward to coming to work.
1​
Never
0​
1​
NeverNever/Rarely
Q1I look forward to coming to work.
2​
Rarely
0​
1​
RarelyNever/Rarely
Q1I look forward to coming to work.
3​
Sometimes
0​
0​
Q1I look forward to coming to work.
4​
Often
1​
0​
OftenOften/Always
Q1I look forward to coming to work.
5​
Always
1​
0​
AlwaysOften/Always

What formula can I put into Column I to produce this, or am I trying to do something that is impossible?

Just to clarify, the questions will have a different number of response options and in different orders, so I can't just use a formula to concatenate specific cells, as these will change.

If I need to add extra columns that is not a problem (so if I need a separate column to concatenate +ve text and one for -ve text I will be able to work with this).
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
What version of excel are you using? Please update your profile so the version appears on your button, and the forum knows what kind of solution would best work for you.

How can we determine what are valid values to concatenate? How did you pick rows 1 and 2 for column I in the first two rows, and rows 4 and 5 for the last two?
 
Upvote 0
Apologies. I'm on 365 and obviously didn't make myself clear originally.

The values in Column I need to be a concatenation of the text in Columns G & H for each question. Column G & H are the scored response options for each question. Columns E & F denote whether or not it is a positive or negative scored question, and all negative text needs to be concatenated together and all positive needs to be together.

Hope this makes a bit more sense. I'm deep in the weeds here, so know I'm probably not making the most sense.
 
Upvote 0
maybe this:
Book1
ABCDEFGHIJ
1Q_#Q_TextR_#R_Text+ve Score-ve Score+ve Text-ve Text
2Q1I look forward to coming to work.1Never01NeverNever/RarelyNever/Rarely
3Q1I look forward to coming to work.2Rarely01RarelyNever/RarelyNever/Rarely
4Q1I look forward to coming to work.3Sometimes00 
5Q1I look forward to coming to work.4Often10OftenOften/AlwaysOften/Always
6Q1I look forward to coming to work.5Always10AlwaysOften/AlwaysOften/Always
Sheet2
Cell Formulas
RangeFormula
J2:J6J2=SWITCH(SIGN(C2-3), 1,TEXTJOIN("/",,TRANSPOSE(FILTER($D$2:$D$6,$E$2:$E$6=1,""))), 0,"", -1,TEXTJOIN("/",,TRANSPOSE(FILTER($D$2:$D$6,$F$2:$F$6=1,""))))

D$2:$D$6,$F$2:$F$6=1,""))))[/XD][/XR][/RANGE]
 
Upvote 0
Try:
Excel Formula:
=IF(COUNTA(G2:H2)=0,"",IF(F2,TEXTJOIN("/",,$H$2:$H$6),TEXTJOIN("/",,$G$2:$G$6)))
 
Upvote 0
Thanks both. Will give them a go and see what works
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top