Feb 25 2021 06:54 PM - edited Feb 25 2021 06:54 PM
Input is any letter in the alphabet.
Advance that letter x amount.
If input is 'B', then output is B + x
If output exceeds Z, I'd like it to wrap back around to the beginning of the alphabet instead of something like BC or AD
So input is Y and x = 4 then output should be C
Thanks
Feb 25 2021 10:39 PM
@MajorHavoc Perhaps like this (with input in B1 and x in B2)?
=CHAR(IF((CODE(B1)+B2)>90,CODE(B1)+B2-26,CODE(B1)+B2))
This assumes that you only enter capitals, by the way.
Feb 25 2021 10:42 PM
Feb 26 2021 01:27 PM
Yes that works well with upper case but if lower case is entered it advances 10 places and outputs " j " .
Very confusing.
Feb 26 2021 01:31 PM - edited Feb 26 2021 01:58 PM
This only works for upper case.
But it's a start.
Feb 26 2021 02:57 PM
Solution
Okay, give this a try:
=IF(EXACT(A1,UPPER(A1)),CHAR(MOD(CODE(A1)+B1-65,26)+65),CHAR(MOD(CODE(A1)+B1-97,26)+97))
Feb 26 2021 02:57 PM
Solution
Okay, give this a try:
=IF(EXACT(A1,UPPER(A1)),CHAR(MOD(CODE(A1)+B1-65,26)+65),CHAR(MOD(CODE(A1)+B1-97,26)+97))