Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2023, 05:55 AM
ArviLaanemets ArviLaanemets is offline Calculate date from two variable fields, with no #value error in empty rows Windows 8 Calculate date from two variable fields, with no #value error in empty rows Office 2016
Expert
 
Join Date: May 2017
Posts: 949
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

Quote:
Originally Posted by wsnow View Post
Fantastic!
Can you explain to me what is different about the formula you wrote that got rid of the error message?
In 1st 2 formulas, you checked for ...AND(ISNUMBER($I2); ISNUMBER($K2))...
This expression returns True, when both $I2 and $K2 have numeric values. For all other cases an empty string is returned.
3rd formula worked OK for me! I think for you at least one of cells $I2 or $K2 was not empty (e.g. there was a space entered - I tested the formula, and your 3rd formula returned error in case into any of those cells as space was entered).



Btw, when you want the formula to be ideal, you have to check the result date for it being February 28th or the source date used for it being February 29th.. When this is the case, then formula must return 0th day of March instead, so depending the year being leap one or not, either 29thor 28th day is returned!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error handling input to a Date variable CuriousG Excel Programming 2 04-05-2022 08:51 AM
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge Berryblue Mail Merge 1 11-13-2014 05:36 PM
Calculate date from two variable fields, with no #value error in empty rows Run-time error 91 object variable or with block variable not set JUST ME Word VBA 4 03-25-2014 06:56 AM
Calculate date from two variable fields, with no #value error in empty rows Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM
30+ days Variable Day Date Calculations via Fields ztag Word 2 01-06-2012 11:12 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:35 PM.


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