Finding acrostics

AVRAHAMROOS

New Member
Joined
Nov 24, 2016
Messages
21
In long texts, I need to find acrostics.

I know how to break up lines.

I use the following (in column B) to get only the first letters of each line: =LEFT(A1,LEN(A1)-LEN(A1)+1)

Now how do I automatically check if there are consecutive letters (alphabetic order) in column B?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
My question was maybe not worded precisely enough. I want to find alphabetic acrostics (abacedarian pooems) in the longer texts, for example:

This line should be ignored
This is the second line
I am not interested in the first three lines
From line number 5 there is an alphabetic pattern
Art is the taste of wild buttercup petals.
Before too long you’ll be forbidden to eat them.
Christ is a god wrapped in gauze,
draped in flaws. Sometimes religion seeps through.
Elephants wrinkle with the flow of the hunt:
Faith is a great ear flapping, unflappable.
Gender will press you to pick from a tree.
Hew to the orchard, and carry no axe.
Illusion finds depth in a shallow pool;
Justice is a lung exploding at the surface.
Kinetic fingers learn best in a cage:
Locks can’t resist an energetic tickle.
Maybe you’ll think I am crazy today--
No matter. Tomorrow is what I address
or what I expect, guard against, will back.
Politeness is listening, unwilling, to me.
Quality hides in a prospector’s pan.
Removed from the gold, it relaxes to earth.
Savannahs exhale, continental and dusty,
tarantulas sigh as one with the tigers.
Uniqueness is all I will ask of you.
Validity answers its own pale questions.
While preachers and prophets would never admit it,
X marks the spot where their sins become yours.
Youth is too new for a language of nuance,
Zero too old for the logic of grownups.
This is the last line and not of interest



I know how to isolate first letters only to get:

[TABLE="width: 72"]
<colgroup><col width="72" style="width:54pt"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 72, align: left"]T[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]T[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]I[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]F[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]A[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]B[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]C[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]d[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]E[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]F[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]G[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]H[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]I[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]J[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]K[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]L[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]M[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]N[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]o[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]P[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]Q[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]R[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]S[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]t[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]U[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]V[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]W[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]X[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]Y[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]Z[/TD]
[/TR]
[TR]
[TD="class: xl64, align: left"]T

I want alphabet (or part of it but at least 4 sequential letters) highlighted[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
This might get you started . . .

=if(code(a2)=(code(a1)+1),TRUE,FALSE)

Returns TRUE if the initial character in A2 is the next character in the alphabet after A1.

You can extend this to deal with multiple cells.

Note that because CODE() refers only to the initial character, you don't need to go through a separate stage of stripping out the initial character.

Note that CODE() is case sensitive.
Therefore you might want to use something like UPPER() to convert all your data into upper case.

Note that if you want to treat YZAB as a valid string, you will need to adapt this further.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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