Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-20-2021, 07:37 AM
Purfleet Purfleet is offline Empty cell if previous cell is the last day of the month Windows 10 Empty cell if previous cell is the last day of the month Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Personally i would get rid of the Merged cells, nothing good will ever come from merged cells - they are a terrible idea.

Anyway rant over, in the first box (a1) i would put
Code:
=IF(EOMONTH($D$6,-1)+COLUMNS($J$4:J4)>EOMONTH($D$6,0),"",TEXT(EOMONTH($D$6,-1)+COLUMNS($J$4:J4),"DD"))
and in the one above

Code:
=IF(EOMONTH($D$6,-1)+COLUMNS($J$4:J4)>EOMONTH($D$6,0),"",TEXT(EOMONTH($D$6,-1)+COLUMNS($J$4:J4),"DDD"))
and incredment each number accross (which is horrible with merged cells - the Columns part deals with this but wont work with merged cells)

Its a bit more complex but far more robust - see my example on your control sheet
Attached Files
File Type: xlsx Copy of PRS_AR12.xlsx (43.7 KB, 17 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
if cell contains date, then month, else blank Merlot Excel 7 03-20-2025 08:16 AM
Empty cell if previous cell is the last day of the month Empty date cell shows wrong month & year Learner7 Excel 3 06-16-2019 11:09 AM
Find last non empty cell (moving horizontally), then move one cell to the right klutch Word VBA 9 07-09-2018 06:16 PM
Data validation,force cell to be filed with number if respective cell is not empty nicholes Excel Programming 0 08-01-2015 09:08 AM
Empty cell if previous cell is the last day of the month If id cell range is empty then should not allow to fill any other cell ubns Excel Programming 2 04-12-2015 06:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft