Formula to recognize change in Column to Combine with Content in Another Column

Status
Not open for further replies.

inosent

Board Regular
Joined
Mar 19, 2007
Messages
131
I have 2 columns, 1 has a term, the other sub-terms related to the term. Let's call Col A the 'main' category, and Col B the 'sub' category. What I want to do is merge Main with sub so that the Main category and the sub category appear together in the same cell (Col C).

Problem:
<table>
<tr><th><th>Col A<th>Col B</tr>
<tr><td>1<td>Main Category<td>Sub-Category</tr>
<tr><td>2<td>Pets<td></tr>
<tr><td>3<td><td>dog</tr>
<tr><td>4<td><td>cat</tr>
<tr><td>5<td><td>turtle</tr>
<tr><td>6<td>Cars<td></tr>
<tr><td>7<td><td>Honda</tr>
<tr><td>8<td><td>BMW</tr>
</table>
Desired Outcome
<table>
<tr><th><th>Col A<th>Col B<th>Col C</tr>
<tr><td>1<td>Main Category<td>Sub-Category<td>Result</tr>
<tr><td>2<td>Pets<td><td>Pets</tr>
<tr><td>3<td><td>dog<td>Pets - dog</tr>
<tr><td>4<td><td>cat<td>Pets - cat</tr>
<tr><td>5<td><td>turtle<td>Pets - turtle</tr>
<tr><td>6<td>Cars<td><td>Cars</tr>
<tr><td>7<td><td>Honda<td>Cars - Honda</tr>
<tr><td>8<td><td>BMW<td>Cars - BMW</tr>
</table>

I am trying to find a formula in Col C I can fill down to produce that result. I hope the way I formed the question makes sense.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Please do not post the same question multiple times. Questions of a duplicate nature will be locked or deleted, per #12 of the Forum Rules and points 6 & 7 of the Forum Use Guidelines.

Any bumps, clarifications, or follow-ups should be posted to the linked thread above.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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