Column contents moved depedning on number of blank cells

Richiejjj

Board Regular
Joined
Feb 18, 2002
Messages
237
HI

I have a worksheet in A1:C726.

The C column looks at the first four letters of the equivalent A column and returns "heading" if the A cell starts with "page" and if not the c column is blank.

So A2 has the words "page 6: commented" so c6 has "heading"
A3 has "are we missing" so c6 is blank.

The A3 cell is the content that needs to be next to the a2 heading. The content cells maybe 1-6 rows, before you get to a new heading.

I need to return to column D, next to the "heading" column a concatenate of the cells from the blank column C.

Any ideas?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Can you post a sample of what the data actually looks like please - I am having trouble visualising the requirement.
 
Upvote 0
Thanks for asking

A:B:C:
1 Page 6- :
2 The quick Brown Fox:
3 Jumped Over:
4 Page 7-:
5 Somewhere over
6 the rainbow:
7 Page 7-:
8 Hello

All the data above is in column A. I basically want :

Page 6-: The quick Brown Fox Jumped Over
Page 7-: Somewhere over the rainbow
Page 7-: Hello

So the data below a Page xxx is inserted/concatenated next the page number heading.
 
Upvote 0
1. Are you looking for a formula solution or macro?

2. What version of Excel are you using?
 
Upvote 0
Formula please, I am using office 365 proplus.
I'm not sure of the exact layout required, but see if something like this heads you in the right direction.

Excel Workbook
AB
1Page 6- :The quick Brown Fox Jumped Over
2The quick Brown Fox:
3Jumped Over:
4Page 7-:Somewhere over the rainbow
5Somewhere over
6the rainbow:
7Page 7-:Hello
8Hello
9
TEXTJOIN 2
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,316
Members
452,634
Latest member
cpostell

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