Merge data in cells vertically if the last cell in the merge always ends in a price?

Perodin

Board Regular
Joined
Sep 16, 2014
Messages
54
Is there a way to merge data in cells vertically if the last cell in the merge always ends in a price?

In this case I have thousands of entries as shown below, and I would like to end up with consolidated rows.
3, 4, and 5 as a single entry
7 and 8 as a single entry
Leaving me (in this example) with 7 rows containing information
13935 Body Clip (Mounting Clip), Angled, 90-Degrees (10) ........................ $3.00
23934 Body Clips, Heavy Duty (12) ............................................................ $3.00
31914R Body Mount, Front & Rear (Black)/ Body Posts, 52Mm (2),
438Mm (2), 25Mm (2), 6.5Mm (2)/ Body Post Extensions (2)/
5Hardware ........................................................................................ $6.00
61815 Body Washers (8) ........................................................................... $2.00
76811 Body, Slash 4X4 (Clear, Untrimmed, Requires Painting)/
8Window Masks/ Decal Sheet ........................................................ $35.00
96817 Body, Slash 4X4, Amsoil (Painted, Decals Applied) .................. $60.00
106831 Body, Slash 4X4, Chad Hord (Painted, Decals Applied) ............ $60.00

<tbody>
</tbody>

My Thoughts:
I assume this will require a qualifier that denotes the last cell always ending in a period followed by 2 numbers. I believe one could also use a qualifier that denotes the last cell containing a $ symbol.

I will also understand if this process would be better achieved by using the function more than once. The first time to merge rows 4 and 5, and 7 and 8. Then again to merge row 3 and the new row 4 that would be created by the previous function.

After this it would be nice to eliminate the prices and periods too, however I believe this data must remain intact until the merge is complete as it is the only thing that notes separation. I thought i would mention it, but I do not expect help with that in this post.

Ideal Results
13935 Body Clip (Mounting Clip), Angled, 90-Degrees (10)
23934 Body Clips, Heavy Duty (12)
31914R Body Mount, Front & Rear (Black)/ Body Posts, 52Mm (2), 38Mm (2), 25Mm (2), 6.5Mm (2)/ Body Post Extensions (2)/ Hardware
41815 Body Washers (8)
56811 Body, Slash 4X4 (Clear, Untrimmed, Requires Painting)/ Window Masks/ Decal Sheet
66817 Body, Slash 4X4, Amsoil (Painted, Decals Applied)
76831 Body, Slash 4X4, Chad Hord (Painted, Decals Applied)

<tbody>
</tbody>

Thank you in advance for any help provided, it is much appreciated!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Ok. Assuming your data starts in A1:

In C1: =IFERROR(IF(AND(LEFT(B1,4)/LEFT(B1,4)=1,RIGHT(B1,3)=".00"),0,1),1)
In D1: =IF(OR(C1=0,C1=1),B1,"")
In E1: =IF($C2=2,$B2,"")
In F1: =IF($C3=3,$B3,"")
In G1: =IF($C4=4,$B4,"")
In H1: =CONCATENATE(D1,E1,F1,G1)
In I1: =IFERROR(LEFT(H1,FIND(" .",H1,1)),"")

That will leave you with what you want in column I.

If you copy column I and paste as values in another worksheet you can sort and remove the blanks.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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