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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,256
Messages
6,123,913
Members
449,132
Latest member
Rosie14

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