• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Replace / Substitute formula required - File attached

aadii

New Member
File Attached - how to Replace Text to Number in a word or multiple words
Thanks in advance
NumberAlphabet
1A I J Q YQUE -I want to Replace these characters and give numeric value whenever comes in a word
2B K R
3C G L Seg bat should return
214​
4D M Tbat B
2​
5E H N XA
1​
6U V WT
4​
7O Zhow to make these formula
8P F
9No Alphabet
 

Attachments

  • replace_substitue text to number in a word.xlsx
    9 KB · Views: 7
Try

in the 'K8' cell (copy down)
Code:
=IF(UPPER(MID($J$8,ROW(A1),1))="",0,UPPER(MID($J$8,ROW(A1),1)))

in the 'L8' cell ARRAY formula (copy down)
Code:
=IFERROR(INDEX($D$5:$D$13,MATCH(TRUE,ISNUMBER(SEARCH("*"&K8&"*","*"&$E$5:$E$13&"*")),0)),"")

in the 'M7' cell
Code:
=TRIM(CONCATENATE(L8,L9,L10,L11,L12,L13))
or
Code:
=VALUE(TRIM(CONCATENATE(L8,L9,L10,L11,L12,L13)))
 

Attachments

  • aadii-navic-44138.xlsx
    14.1 KB · Views: 4
1] Criteria housed In Column G

2.1] Using CONCAT function (available in Office 365)

In H5, formula copied down :

=CONCAT(INDEX(MATCH("*"&MID(G5,ROW(INDIRECT("1:"&LEN(G5))),1)&"*",$E$5:$E$12,0),0))

or,

2.2] If you do not have Office 365, you could use this longer formula for all Excel versions

=SUMPRODUCT(INDEX(MATCH("*"&MID(G5,ROW(INDIRECT("1:"&LEN(G5))),1)&"*",$E$5:$E$12,0),0)*10^(LEN(G5)-ROW(INDIRECT("1:"&LEN(G5)))))


67342

Regards
 
Last edited:
Back
Top