How to Highlight the Odd or Even Months in Excel

How to Highlight Odd or Even Months in Excel
In this intermediate excel tutorial I’ll show you how to mark odd and even dates from a date list in Microsoft Excel. I’ll be using formula and conditional formatting to solve this. Let’s follow the procedure below and you’ll be able to highlight odd and even months.
Similar Videos:
How to apply color banded rows or columns in excel: • How to apply color ban...
How to Highlight Odd or Even Days in Excel: • How to Highlight Odd o...
How to Highlight Odd and Even Year in Excel: • Video
How to Highlight Odd and Even Number in Excel: • Video
Highlight Odd Months:
Here our formula will be =MOD(MONTH($A1),2) that we will be using inside Conditional Formatting.
Let's break down the formula =MOD(MONTH($A1),2):
$A1: This refers to cell A1. The $ sign before the column letter and row number makes the reference absolute, which means that when you copy the formula to other cells, it will always refer to column A.
MONTH($A1): This function extracts the Month component from the date in cell A1. For example, if cell A1 contains the date "April 27, 2024", this function will return 4.
MOD(): This function calculates the remainder of a division operation. It takes two arguments: the number you want to divide and the divisor.
MOD(MONTH($A1),2): This part of the formula divides the Month extracted from cell A1 by 2 and returns the remainder. So, if the Month is odd, the remainder will be 1; if the Month is even, the remainder will be 0.
Now 1 = True and 0 will be False is a universal rule and we will be using this in the conditional formatting and thus highlight odd Months from a date.
Highlight Odd Months from Dates using Conditional Formatting:
Step 1: Select the range where you have dates and need to highlight.
Step 2: From the “Home” tab click on “Conditional Formatting” and then “New Rule”
Step 3: Click on “Use Formula to Determine Which Cells to Format” and Paste the Formula inside the box. For odd dates the formula will be =MOD(MONTH($A1),2)
Step 4: Now click on format and Select your preferred formatting.
Step 5: Click ok and ok again
Done. You have successfully formatted all the odd dates inside your selection.
Now what if you need to highlight all the Even Months?
You need to change the formula a bit. If we reverse the result in the previous formula it will work. To do that we can use the NOT function to wrap the above formula. NOT function converts True to False and False to True and thus 0 to 1 and 1 to 0. This will now help us to reverse the formula above.
So, if you need to highlight all the Even month follow the exact procedure and just use this formula =NOT(MOD(MONTH($A1),2)) inside conditional formatting instead of above one.
#Highlight #OddEven #Months
Thanks for watching.
----------------------------------------------------------------------------------------
Support the channel with as low as $5
/ excel10tutorial
----------------------------------------------------------------------------------------
Please subscribe to #excel10tutorial
goo.gl/uL8fqQ
Here goes the most recent video of the channel:
bit.ly/2UngIwS
Playlists:
Excel Tutorial for Beginners: goo.gl/UDrDcA
Intermediate Excel Tutorial: tinyurl.com/59a837py
Advance Excel Tutorial: goo.gl/ExYy7v
Excel Text Case Conversion Techniques: goo.gl/xiP3tv
Combine Workbook & Worksheets: bit.ly/2Tpf7DB
All About Comments in Excel: bit.ly/excelcomments
Excel VBA Programming Course: bit.ly/excelvbacourse
ChatGPT Excel Mastermind: tinyurl.com/46kn7tmd
Social media:
Facebook: / excel10tutorial
Twitter: / excel10tutorial
Blogger: excel10tutorial.blogspot.com
Tumblr: / excel10tutorial
Instagram: / excel_10_tutorial
Hubpages: hubpages.com/@excel10tutorial
Quora: bit.ly/3bxB8JG
Website: msexceltutorial.com/

Пікірлер