LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 3
Default Combine Rows Based on Capitalization

I have text that looks like this:

###

FOUR SCORE and seven years ago
our fathers brought forth on
this continent
A NEW NATION conceived
in liberty and dedicated
to the proposition
that all men are created equal
NOW WE ARE ENGAGED in a great civil war
testing whether that nation
OR ANY NATION
so conceived and so dedicated
can long endure
WE ARE MET ON A GREAT battle-field
of that war

###

There is no regularity to the number of lower-cased rows between the capitalized rows, nor is there any regularity to how many letters are capitalized at the beginning of the capitalized rows. I want the output to look like this, so that Excel combines rows, adding a space at the front and starting a new row when it hits a capital letter:

###

FOUR SCORE and seven years ago our fathers brought forth on this continent
A NEW NATION conceived in liberty and dedicated to the proposition that all men are created equal
NOW WE ARE ENGAGED in a great civil war testing whether that nation
OR ANY NATION so conceived and so dedicated can long endure
WE ARE MET ON A GREAT battle-field of that war

###

And to make things even more complicated, sometimes the lower-cased rows actually start with a single capitalized letter. So really, I want it to start a new row when it hits more than TWO capital letters in a row.

Any ideas? Thanks in advance.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to combine data based on two fields.. gambler1650 Excel Discussion (Misc queries) 1 May 4th 10 08:11 PM
How do I combine worksheets w/o enough rows to combine? Amanda W. Excel Worksheet Functions 3 June 9th 09 07:26 AM
Combine data in rows based on two citeria [email protected] Excel Programming 5 June 21st 07 05:36 PM
combine 2 tables of data into one based on date Tim Nealon Excel Worksheet Functions 5 September 1st 06 01:42 AM
Macro to combine data based on IF,THENs? marlea[_3_] Excel Programming 3 September 15th 05 10:32 PM


All times are GMT +1. The time now is 04:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"