Avatar of pdvsa
pdvsaFlag for United States of America

asked on 

25th of every month

Experts,

How can I show the 25th of the month based on the current date and if the 25 of the month has passed then use the next month?  

ie:
today = Oct 5
result:  Oct 25

if today = Oct 26 then
result = Nov 25th

==>but if it falls on a Friday or Saturday then use the preceding.

thank you

User generated image
Microsoft Excel

Avatar of undefined
Last Comment
pdvsa
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

try this:

=IF(DAY(TODAY()) <= 25, TEXT(TODAY(), "MMM DD"), TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())+1, 25), "MMM DD"))

Open in new window

Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

you can also use this if you want to return a date value instead.

=IF(DAY(TODAY()) <= 25, DATE(YEAR(TODAY()),MONTH(TODAY()), 25), DATE(YEAR(TODAY()),MONTH(TODAY())+1, 25))

Open in new window


use the Number Format to format the date value accordingly.
Avatar of Rgonzo1971
Rgonzo1971

Hi,

pls try

=EOMONTH(DATE(YEAR(A1),MONTH(A1),DAY(A1)-25),0)+25-WEEKDAY(EOMONTH(DATE(YEAR(A1),MONTH(A1),DAY(A1)-25),0)+25)+MIN(5,WEEKDAY(EOMONTH(DATE(YEAR(A1),MONTH(A1),DAY(A1)-25),0)+25))

Open in new window

Regards
Avatar of Koen
Koen
Flag of Belgium image

try this :

=WORKDAY(IF(DAY(TODAY())<=25;DATE(YEAR(TODAY());MONTH(TODAY());25);DATE(IF(MONTH(TODAY())<12;YEAR(TODAY());YEAR(TODAY())+1);IF(MONTH(TODAY())<12;MONTH(TODAY())+1;1);25));0)

(you might need to replace ; with , depending on your regional settings)
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of pdvsa
pdvsa
Flag of United States of America image

ASKER

Nice!  Sorry  for my tardy reply. I got a little sidetracked with my job. I don't like this job anymore
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo