Function to display the Australia day date but if Australia day falls on a saturday or sunday for a year, display nothing

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
2,352
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have the year in G85.

I am trying to make write an excel function to display the date of Australia day for the year in G85 but if it falls on a saturday on sunday, I want to display nothing in G96, where the formula is.

Can someone show me what is wrong with my function please?

Excel Formula:
=IF(OR(WEEKDAY(DATE(G85,1,26))={7}, WEEKDAY(DATE(G85,1,26))={1}), “”, DATE(G85,1,26))
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I worked it out, I think there was something wrong with the double inverted commas. I deleted them and typed them in again and it seemed to work.

:unsure:
 
Upvote 0
Solution
consider

Date and Time.xlsm
AB
1
2Jan 26, 2021
3
18a
Cell Formulas
RangeFormula
B2B2=IF(WEEKDAY(DATE(G85,1,26),2)>5,"",DATE(G85,1,26))
 
Upvote 0
What is the difference between your function and mine?
 
Upvote 0

Forum statistics

Threads
1,216,129
Messages
6,129,047
Members
449,482
Latest member
al mugheen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top