Changing letters in a word using a database - DECODING WORDS

makiwara

Board Regular
Joined
Mar 8, 2018
Messages
171
Hi, I need a code which decodes a word using a database. It's hard to explain, but I will try.

Input in column "E":

LAMP
LAMB
COMPUTER
WORD
WORLD
ALLOW

Code database in Range A1:B44
For example:


LA la
L l
MP mp
MB mb
C c
OMP omp
UTET uter
WOR wor
D d
A a
O o
W w

Output column "F":
lamp
lamb
computer
...

I made an Input List. I want to search the code for each "string" in the database (A1:B44, starting from first cell) and if found in Column "A", store the value of column "B" (with format) in a temporary string. After it, the code "cuts" the found string from the original and search again from codes from A1:B44.

This is an example database, so it's easy to check.

The real one contains data in the database like: A - a51 or B - kdjd or C - ols . So it's irrevelant for us now.

So the program starts by LAMP:
- checks from range A1 to A44:
- LA is found from left to right, so la comes

MB
- checks from range A1 to A44:
- MB is found from left to right, so mb comes

and so on until there is no more character in the word


Thank you for your time! I thought about this project, but it requires some complex part and I am very confused. Have a very nice day!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
COMPUTER:
1. code searches for each data in column "A" and finds C--> temp= c
2. remains: OMPUTER
- code searches for each data in column "A" (from the left of OMPUTER to the right)-->
LA found? no.
L found? no.
...
OMP found? YES temp="c" & "omp" ="comp"

3. remains: UTER
- code searches for each data in column "A" (from the left of UTER to the right)-->
- UTER is the only match --> "comp" & "uter" = "computer"

this one is ready, goes to next row in column "E" to the next word.

I hope that I could explain well. Thank you for your help! Have a nice day!
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,655
Members
448,975
Latest member
sweeberry

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