How to Use REGEXMATCH for Highlighting the Current Month?

  • Thread starter Thread starter Steven Ellet
  • Start date Start date
Click For Summary
To highlight the current month in Excel using REGEXMATCH, the existing formula checks for "May" but needs to be modified for dynamic cell lookup. A suggested approach is to replace "May" with a formula that retrieves the current month's name based on the current date. The provided lengthy formula uses nested IF statements to return the month's name corresponding to the current month number. This can be applied to highlight cells in columns B and C. The discussion concludes with a reference to a resource for further guidance on highlighting the current month in Excel.
Steven Ellet
Messages
85
Reaction score
3
Current Formula =IF(REGEXMATCH(B1,"May"), 1, 0)
Problem: I am trying to find a way to replace "May" with a cell lookup.
Goal: Highlight any cell with current month (in this case, May) in B:B or C:C (if I need 2 formulas, that is fine)
Extra info:
Cell lookup: =IF((MONTH(TODAY()))=1,"January",IF((MONTH(TODAY()))=2,"February",IF((MONTH(TODAY()))=3,"March",IF((MONTH(TODAY()))=4,"April",IF((MONTH(TODAY()))=5,"May",IF((MONTH(TODAY()))=6,"June",IF((MONTH(TODAY()))=7,"July",IF((MONTH(TODAY()))=8,"August",IF((MONTH(TODAY()))=9,"September",IF((MONTH(TODAY()))=10,"October",IF((MONTH(TODAY()))=11,"December",IF((MONTH(TODAY()))=12,"May"))))))))))))
 
Computer science news on Phys.org
Case solved
 
LLMs and AIs have a bad reputation at PF, and I share this opinion. I have seen too much nonsense they produced, and too many "independent researchers" who weren't so independent after all, since they used them. And then there is a simple question: If we had to check their results anyway, why would we use them in the first place? In fact, their use is forbidden by the rules. I tend to interpret the reason for this rule because nobody wants to talk to a machine via PF. Those who want to can...

Similar threads

  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 29 ·
Replies
29
Views
5K
Replies
2
Views
2K
Replies
44
Views
5K
Replies
2
Views
12K
  • · Replies 6 ·
Replies
6
Views
8K
Replies
15
Views
4K
  • · Replies 11 ·
Replies
11
Views
5K