Forum Discussion
williamgurney
May 22, 2024Copper Contributor
Using CHAR(COLUMN()+64) within Conditional Formatting
Hi, I have a need to highlight a set of cells based on whether or not a date (date is concatenated based on multiple other cells) =TODAY(). Heres the background: A1 = "2024" A2 through A61 ...
williamgurney
May 23, 2024Copper Contributor
Thank you! You set me down the correct path!
Here's the end result that works:
=DATE($A$1,5,INDIRECT(
IF(COLUMN()<27,CHAR(COLUMN()+64),
IF(COLUMN()>26,"A"&CHAR(COLUMN()+38),
CHAR(COLUMN())))&"$"&22))=TODAY()
$A$1 = 2024
5 = May
IF(COLUMN()<27,CHAR(COLUMN()+64),IF(COLUMN()>26,"A"&CHAR(COLUMN()+38) = Due to the fact that the column numbers are beyond "Z" ("Z" column number = 26, "AA" = 27 (which CHAR returns "["), "AB" = 28 (which CHAR returns "\") and so on) I had to add a condition to identify >26, and subsequently only add 38 (64-26=38) so it would append "A" and the second character for "AA" and beyond.
Again, thank you so much!
Martin_Angosto
May 23, 2024Iron Contributor
Nice! So glad you could work that in a way it fits to your specific case. Wisely done.