fuction which search and change letter

gorky112

New Member
Joined
Mar 30, 2020
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Hey,
I need a function that:
Checks if a word in a cell contains a given letter, e.g.:
If in A1="KcJh3d" there is a K and J and 3, then in B1="HML",
If in A2="9c8h2d" there is a K and J and 3, then in B1="MML".
I have column A and an array. I want zaby in column B to assign values such as HML or MML to column A.

ps I want to group the types of common cards in poker. The column is the possible common cards and HML etc are their groupings. H = high, M = mid, L = low.


Translated with www.DeepL.com/Translator (free version)
 

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.
For version 2013 I can't build a single cell formula.
Would this do?
PS: Textjoin is for versions 2016 and later.
Book1
ABCDEFGHIJ
1
2135
3KcJh3dHHLHHLHHLKingKH
49c8h2dHMLHMLHMLQueenQH
5JackJH
610H
79H
88M
97M
106M
115M
124L
133L
142L
151L
Sheet1
Cell Formulas
RangeFormula
B3:D4B3=INDEX($J$3:$J$15,MATCH(MID($A3,B$2,1),$I$3:$I$15&"",0))
E3:E4E3=CONCATENATE(B3,C3,D3)
F3:F4F3=TEXTJOIN("",TRUE,INDEX($J$3:$J$15,MATCH(MID(A3,{1,3,5},1),$I$3:$I$15&"",0)))
I6:I15I6=SEQUENCE(10,,10,-1)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,947
Members
449,095
Latest member
nmaske

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