How to check if the first letter of a string is in alphabetical order in a column

gaose77777

New Member
Joined
Jan 27, 2023
Messages
2
Hello, I want to check if the first letter of a string is in alphabetical order in a column, output 'Y' if it is otherwise output 'N'
Ex:
1674842046430.png

As it can be seen, the string in A6 starts with 'G' and A10 starts with 'B' which are not in alphabetical order in the previous cell.
 

Attachments

  • 1674841993234.png
    1674841993234.png
    6.7 KB · Views: 3

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi,

In cell B2, you can test following Array Formula
=IF(AND(A2:A2>A1:A1),"Y","N")
 
Upvote 0
Hi,

In cell B2, you can test following Array Formula
=IF(AND(A2:A2>A1:A1),"Y","N")
Hello, thanks for the reply.
When I applied the formula, it turned out like the following:
1674848535016.png

Only Cell 7 returned the correct value and the rest returned false. Is there anyway to fix these? Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,243
Messages
6,123,837
Members
449,129
Latest member
krishnamadison

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