Finding the Maximal String, Based on Alphabetic Order

helivw

New Member
Joined
Oct 6, 2018
Messages
26
Does anyone knows the formula to Find the Maximal String, Based on Alphabetic Order
I have a column with data:
AB001
AB002
EF001
EF002
EF003
KE001
KE002
KE003
AB003

I need a formule which gives me the Maximum String in the Strings starting with EF so the result of my formula must be => EF003

Thanks for helping me out. I appreciate
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi,

Try this .... fits the example you're asking

Ctl+Shift+Enter NOT just Enter

="EF"&TEXT(MAX((--(LEFT(A1:A9,2)="EF")*(RIGHT(A1:A9,3)))),"000")
 
Upvote 0
I meant to say, what a quick service

I tried to convert your formula to a a vba formula but until now I can't find it

Could you please help again.
Thanks a lot
 
Upvote 0
Try
Code:
Range("B1").Value = [="EF"&TEXT(MAX((--(LEFT(A1:A9,2)="EF")*(RIGHT(A1:A9,3)))),"000")]
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0
Thanks again for your help in the past

Range("B1").Value = [="EF"&TEXT(MAX((--(LEFT(A1:A9,2)="EF")*(RIGHT(A1:A9,3)))),"000")]
I have an extra question
How can I replace "EF" by a variable

If I write: EF_String="EF"
and I replace it in you formula I get error 2015 as result

Range("B1").Value = [=EF_String&TEXT(MAX((--(LEFT(A1:A9,2)=EF_String)*(RIGHT(A1:A9,3)))),"000")]

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

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