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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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:

T
T
I
F
A
B
C
d
E
F
G
H
I
J
K
L
M
N
o
P
Q
R
S
t
U
V
W
X
Y
Z
T

I want alphabet (or part of it but at least 4 sequential letters) highlighted

<colgroup><col width="72" style="width:54pt"> </colgroup><tbody>
</tbody>
 
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,214,635
Messages
6,120,660
Members
448,975
Latest member
sweeberry

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