Alpha coding

alliswell

Board Regular
Joined
Mar 16, 2020
Messages
190
Office Version
  1. 2007
Platform
  1. Windows
  2. Mobile
Screenshot_20230508-110602.jpg


a b c d e f g h i j k l m
n o p q r s t u v w x y z

Hi everybody !
In a1 is some coding.
In b1 whenever i write "a" i shud get "n" & if i write "n" i shud get "a". For example i want to write "hello" it shud get converted to "uryyb" because above in alphabets below h is u, below e is r, below l is y and anove o is b that becomes hello when converted in coding language.

Try with formula plz

Thanks & regards to all my mrexcel team
 
Dear peter still no reply ?
No, I thought it reasonable to have a meal.
Please be patient, helpers may be in any time zone in the world - and are not being paid to provide you with immediate answers.

alliswell.xlsm
AB
1abcdefghijklm nopqrstuvwxyz
2
3
4hellouryyb
5zebramroen
6hello world!uryyb jbeyq!
Coding
Cell Formulas
RangeFormula
B4:B6B4=LET(s,SUBSTITUTE(A$1,CHAR(10),""),m,LEN(s)/2,c,MID(A4,SEQUENCE(LEN(A4)),1),p,FIND(c,s),CONCAT(IFERROR(MID(s,MOD(p-1,m)+1+m*(p<=m),1),c)))
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
No, I thought it reasonable to have a meal.
Please be patient, helpers may be in any time zone in the world - and are not being paid to provide you with immediate answers.
Thanks peter its working. But instead of writing hello i must write uryyb in A2 column and then it must convert/decode to hello in b2. Because i will write code in column A and then it must decode it in column B

And sorry bro Leave every task and have meals first. Its important.
 
Upvote 0
Did you try doing that?
Yeah peter bro i tried by interchanging some formulas, but received error. Logically it wont happen, coz unaware of some LET formula & some mathematics u used is really un-understandable. You are genius but i am still learning to hatch out.
 
Upvote 0
Yeah peter bro i tried by interchanging some formulas, but received error.
Not sure why you were changing formulas, all you needed to do was type uryyb into the cell where I had hello without changing tghe formula at all.

alliswell.xlsm
AB
1abcdefghijklm nopqrstuvwxyz
2
3
4uryybhello
Coding
Cell Formulas
RangeFormula
B4B4=LET(s,SUBSTITUTE(A$1,CHAR(10),""),m,LEN(s)/2,c,MID(A4,SEQUENCE(LEN(A4)),1),p,FIND(c,s),CONCAT(IFERROR(MID(s,MOD(p-1,m)+1+m*(p<=m),1),c)))
 
Last edited:
Upvote 0
This looked like a fun exercise.

This is what I came up with.

Excel Formula:
=LET(
    t,CODE(MID(A4,SEQUENCE(LEN(A4)),1)),
    f,LAMBDA(x,
        LET(
            n,IF(and(x>64,x<96),65,97),
            CHAR(MOD(x-n-13,26)+n)
        )
    ),
    REDUCE("",t,LAMBDA(s,c,s&f(c)))
)
 
Upvote 0
This looked like a fun exercise.

This is what I came up with.

Excel Formula:
=LET(
    t,CODE(MID(A4,SEQUENCE(LEN(A4)),1)),
    f,LAMBDA(x,
        LET(
            n,IF(and(x>64,x<96),65,97),
            CHAR(MOD(x-n-13,26)+n)
        )
    ),
    REDUCE("",t,LAMBDA(s,c,s&f(c)))
)
Thanks a lot irobbo. I appreciate your efforts.

And thanks petersss. Hats off.
 
Upvote 0
=LET(s,SUBSTITUTE(A$1,CHAR(10),""),m,LEN(s)/2,c,MID(A4,SEQUENCE(LEN(A4)),1),p,FIND(c,s),CONCAT(IFERROR(MID(s,MOD(p-1,m)+1+m*(p<m),1),c)))
Hi peter
Can you provide me the same formula for royal kings too plz.
royalkings
1234567890
When i type r i must get 1 and whenever i type 1 i must get r. Both ways working will be easier for me to print on labels quickly.

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

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