formula help

lirkus84

New Member
Joined
Mar 18, 2016
Messages
8
Hello I need some help with creating a formula for the below table. What I am trying to achieve is in the "required results" column A. The "Name" entries will always have "Name" preceding
required results
Name Jimmy
Name Jimmy -shoes
-shoes
Name Tom
Name Tom-Balls
-Balls
Name Tom-nets
-nets
Name Tom-snacks
-snacks

<tbody>
</tbody>
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Let's say that your data is in the range B1:B6.
Then enter this formula in cell A2 and copy down for all rows:
Code:
=IF(LEFT(B2,4)="Name","",IF(LEFT(B1,4)="Name",B1 & B2,LEFT(A1,LEN(A1)-LEN(B1)) & B2))
 
Upvote 0
Same general idea as Joe4:

BCDE
1ListHelperRequired Results
2Name JimmyName Jimmy-shoes
3-shoesName Jimmy-shoesName Tom-Balls
4Name TomName Tom-nets
5-BallsName Tom-BallsName Tom-snacks
6-netsName Tom-netsName Mary-socks
7-snacksName Tom-snacksName Mary-shin guards
8Name MaryName Alice-chalk
9-socksName Mary-socks
10-shin guardsName Mary-shin guards
11Name Alice
12-chalkName Alice-chalk
13

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet8

Worksheet Formulas
CellFormula
C2=IF(LEFT(B2,4)="Name","",LOOKUP(2,1/ISERROR(FIND("-",$B$1:$B1)),$B$1:$B1)&B2)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
D2{=IFERROR(INDEX($C$2:$C$20,SMALL(IF($C$2:$C$20<>"",ROW($C$2:$C$20)-ROW($C$2)+1),ROWS($D$2:$D2))),"")}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



I added an array formula in D to remove the spaces if you want.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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