Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 126
Default Substitute letters by others in a word

Hi,

Someone sent me one of those silly puzzles where the I need to
unscramble the word.

I want to solve this puzzle.
Cells A1 to L8 contains each one scrambled word.

cells O1:P26 have the alphabetical letter on the first column and
whatever I want on the second.

I need a formula on A15 that will take the word on A1 and replace all
the letters in the word using my key.

Suppose the letter in A1 is VI.
Suppose P22 for the letter V is T, for P9 for the letter I is O.
The result on cell A15 would then be TO.

I hope its clear.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Substitute letters by others in a word

I don't think this can be done using a formula but I will love to be proved
wrong...

" wrote:

Hi,

Someone sent me one of those silly puzzles where the I need to
unscramble the word.

I want to solve this puzzle.
Cells A1 to L8 contains each one scrambled word.

cells O1:P26 have the alphabetical letter on the first column and
whatever I want on the second.

I need a formula on A15 that will take the word on A1 and replace all
the letters in the word using my key.

Suppose the letter in A1 is VI.
Suppose P22 for the letter V is T, for P9 for the letter I is O.
The result on cell A15 would then be TO.

I hope its clear.
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Substitute letters by others in a word

HJoe,

You could use a custom UDF: put the code below into a regular codemodule in
your workbook, then use it like this in cell A15

=NewWord(A1,$O$1:$P$26)

Then copy that cell to A15:L22

HTH,
Bernie
MS Excel MVP


Function NewWord(c As Range, Subs As Range) As String
Dim i As Integer
NewWord = ""
For i = 1 To Len(c.Value)
NewWord = NewWord & Application.VLookup( _
Mid(c.Value, i, 1), Subs, 2, False)
Next i
End Function

wrote in message
...
Hi,

Someone sent me one of those silly puzzles where the I need to
unscramble the word.

I want to solve this puzzle.
Cells A1 to L8 contains each one scrambled word.

cells O1:P26 have the alphabetical letter on the first column and
whatever I want on the second.

I need a formula on A15 that will take the word on A1 and replace all
the letters in the word using my key.

Suppose the letter in A1 is VI.
Suppose P22 for the letter V is T, for P9 for the letter I is O.
The result on cell A15 would then be TO.

I hope its clear.
Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Substitute letters by others in a word

Hi,

Here is the basic idea for a LONG formula, how long depends on how long your
longest word can be.

=LOOKUP(MID(A1,1,1),$O$1:$O$26,$P$1:$P$26)&IF(LEN( A1)=2,LOOKUP(MID(A1,2,1),$O$1:$O$26,$P$1:$P$26)," ")&IF(LEN(A1)=3,LOOKUP(MID(A1,3,1),$O$1:$O$26,$P$ 1:$P$26),"")

This handles 3 letter word, just add another
&IF(LEN(A1)=3,LOOKUP(MID(A1,3,1),$O$1:$O$26,$P$1: $P$26),"") and change both
3's to 4's. Repeat this as many times as necessary.

If this helps, please click the Yes button.
--
Thanks,
Shane Devenshire


" wrote:

Hi,

Someone sent me one of those silly puzzles where the I need to
unscramble the word.

I want to solve this puzzle.
Cells A1 to L8 contains each one scrambled word.

cells O1:P26 have the alphabetical letter on the first column and
whatever I want on the second.

I need a formula on A15 that will take the word on A1 and replace all
the letters in the word using my key.

Suppose the letter in A1 is VI.
Suppose P22 for the letter V is T, for P9 for the letter I is O.
The result on cell A15 would then be TO.

I hope its clear.
Thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Substitute letters by others in a word

On Sat, 25 Oct 2008 19:19:37 -0700 (PDT), "
wrote:

Hi,

Someone sent me one of those silly puzzles where the I need to
unscramble the word.

I want to solve this puzzle.
Cells A1 to L8 contains each one scrambled word.

cells O1:P26 have the alphabetical letter on the first column and
whatever I want on the second.

I need a formula on A15 that will take the word on A1 and replace all
the letters in the word using my key.

Suppose the letter in A1 is VI.
Suppose P22 for the letter V is T, for P9 for the letter I is O.
The result on cell A15 would then be TO.

I hope its clear.
Thanks


Here's one way.

Download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr/

Then use this **array-entered** formula.

To **array-enter** a formula, hold down <ctrl<shift while hitting <enter.
Excel will place braces {...} around the formula:

=MCONCAT(TRANSPOSE(OFFSET(P1,MATCH(MID(A1,INTVECTO R(LEN(A1),1),1),$O$1:$O$26,0)-1,0)))

--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup using partial word, first 4 letters headly Excel Worksheet Functions 2 June 10th 08 05:58 PM
how do I reduce the spaces between letters in a word? Spaces between letters Excel Discussion (Misc queries) 1 June 10th 08 05:50 PM
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE.... max. limit 8 :( [email protected] Excel Discussion (Misc queries) 6 May 22nd 08 05:33 PM
How do change a column of data in capitol letters to small letters Barb P. Excel Discussion (Misc queries) 6 November 15th 06 06:17 PM
How do you sort words in Excel by the number of letters in a word Kinger New Users to Excel 2 May 2nd 05 11:42 PM


All times are GMT +1. The time now is 02:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"