Forum Discussion
Converting date into letters
- May 19, 2023
Jim_T_0228 CHR should have been CHAR and did you replace the "d" with the cell reference? see attached example
if you have Excel 365 I recommend a LAMBDA function:
DateCode := LAMBDA(d, CHAR(65+YEAR(d)-2023) & CHAR(64 + MONTH(d)) & TEXT(d,"mmdd") )
and then you can call from any cell =DateCode(A1)
If you don't have Excel 365 or prefer not using a LAMBDA then the formula is just:
=CHAR(65+YEAR(d)-2023) & CHAR(64 + MONTH(d)) & TEXT(d,"mmdd")
where d is the date or reference to the date to be used
Oh-boy... help me unpack THAT one... My version of Excel doesn't have a CHR or LAMBDA function. There is a CHAR function, but when I append everything else you note below (with spaces and ampersands) it gives me a name error.
What am I doing wrong, or rather is there another way you can think of?
- mtarlerMay 19, 2023Silver Contributor
Jim_T_0228 CHR should have been CHAR and did you replace the "d" with the cell reference? see attached example
- Jim_T_0228May 19, 2023Copper ContributorGENIUS. Thank you!
- HansVogelaarMay 19, 2023MVP