Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 03-19-2025, 12:19 PM
ArviLaanemets ArviLaanemets is offline if cell contains date, then month, else blank Windows 8 if cell contains date, then month, else blank Office 2016
Expert
 
Join Date: May 2017
Posts: 960
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

What is really the value in cell A37?
Is it a date, and the cell is formatted as "mm,dd,yyyy"?
When yes, then (as dates in Excel really are positive numbers)
Code:
=IF(A37>0, MONTH(A37), "")
Or is it a datestring either entered/copied into call manually, or the result of FORMAT(function)?
When yes, then (assumed "mm,dd,yyyy" is a valid date format for your local settings, but you can handle non-valid values with IFERROR() when there is a possibility for it)
Code:
=IF(IFERROR(DATEVALUE(A37),0)>0, MONTH(A37), "")
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
if cell contains date, then month, else blank Auto update excel graph range, ignore data when date reads 00-Month-00 SavGDK Excel 2 06-24-2016 08:05 AM
Excel day date month year Function greginky Excel 1 01-05-2016 02:19 AM
if cell contains date, then month, else blank Filter by a Month that falls within a date range MattG1225 Excel 2 12-03-2015 07:44 AM
if cell contains date, then month, else blank Formulato say if cell is blank do this, if not blank do this. mbesspiata Excel 1 01-17-2015 05:02 AM
calculate date if date entered in cell, do nothing if blank ConfuddledOne Excel 3 11-07-2014 09:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02: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