combining select text from independent cells when they agree

polyocho

New Member
Joined
Dec 28, 2014
Messages
14
Can I combine select text from independent responses in different excel cells, similar to how independent clauses are combined in English grammar using commas and conjunctions (Bob is bad. Billy is bad.-->Bob and Billy are bad.)?

I have a spreadsheet with values populated by a survey asking about whether something happens more frequently on (A) weekdays, (B) weekends, (C) vacation, or (D) away from home.

For each question there are two possible responses ("occurs" or "does not occur". I am left with spreadsheet, for example as follows:
A1: Does not occur less frequently during weekdays
B1: Does not occur less frequently during weekends
C1: Occurs less frequently on vacation
D1: Does not occur less frequently away from home

1) Can A1 - D1 be combined conditionally when they are similar, resulting in the following (as an example)
E1: Does not occur less frequently during weekdays, weekends or away from home.
F1: Occurs less frequently on vacation

2) Can the use of AND vs OR also be specified depending on the components of the text ("does not occur" vs. "occurs") such as in the following example:

A1: Occurs less frequently during weekdays
B1: Does not occur less frequently during weekends
C1: Occurs less frequently on vacation
D1: Does not occur less frequently away from home

This would then result in the following (for example):
E1: Does not occur less frequently during weekends or away from home.
F1: Occurs less frequently on weekdays and on vacation

Thanks in advance.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
see this
first formulas in B1 and C1
they are copied down till row 4 (till data is there)

below the data in B7 see the formula
Sheet1

*ABC
1Does not occur less frequently during weekdays Does not occur less frequently duringweekdays
2Does not occur less frequently during weekendsDoes not occur less frequently duringweekends
3Occurs less frequently on vacationOccurs less frequently onvacation
4Does not occur less frequently away from homeDoes not occur less frequently away fromhome
5***
6***
7*Does not occur less frequently during weekdays weekdays ,weekends*

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:326.4px;"><col style="width:382.4px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B1=TRIM(LEFT(A1,LEN(A1)-LEN(C1)-1))
C1=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),LEN(A1)))
B7=A1&" " &C1&","&C2

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
Thank you. This seems like a viable solution. It seems this solution parses the sentence and then inserts the parsed words in column C into a sentence. The problems with this solution might be 1) it does not utilize any conjunctions AND or OR in the sentence structure 2) if all 4 answers are that "it occurs more frequently" this solution may leave a string of text that will just be left blank "Does not occur less frequently during"
 
Upvote 0
item 1. you can use any other word(s) in concatenation formula in B7
item 2. not clear. do you want computer to interpret "more frequently" as "not less frequently". No computer is just a super fast idiot. It cannot interpret like an educated human being. You have to tell it to interpret like that.
for e.g.

A1 "yes"

in B1 type
=if(a1="yes","")

this means if A1 is yes B1 is no and if A1 is not yes B1 is blank
that is interpret Yes and no
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,759
Messages
6,132,556
Members
449,735
Latest member
Gary_M

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