Search for text at end of string

njkollauf

New Member
Joined
Sep 18, 2015
Messages
12
Currently I am working on pulling out the max values based off criteria.

However, the array where there =Max(if(iserror(search( array function is search can contain a variety of formats.

Say I want to look up "KD100". I would want to pull back 3 instances:

"KD100" by itself
"*KD100,*", either at the beginning or in the middle of a delimited list
"*,KD100" when it is at the end of the delimited list

The issues is that the last instance ("*,KD100") is hitting when I search for "KD1" and "KD10". Is there a way to denote that I want no text after KD100 in the third instance?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Instead of SEARCH, maybe try:

=RIGHT(array,3)="KD1"

or some variation of that.
 
Upvote 0
Instead of SEARCH, maybe try:

=RIGHT(array,3)="KD1"

or some variation of that.


Good idea!

=MAX(IF(RIGHT($M$2:$M$100,LEN($H4))=$H4,$Z$2:$Z$100,0)) seemed to do the trick where it only looks at the last item in the delimited list. Thanks for the idea!
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
Members
448,980
Latest member
CarlosWin

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