Excel doesn't recognize date printed by Now() Function

learningthings

New Member
Joined
Oct 29, 2021
Messages
35
Office Version
  1. 365
Platform
  1. Windows
I am printing a timestamp from a userform such that when someone clicks a button, I call the Now() function.
This prints for example, 11/15/2021 9:34:30 AM
But say I want excel to sumif between two dates, it won't recognize the above format as a date
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
It should work correctly but what you have told us could be open to a lot of misinterpretation.

Is the date being 'printed' to a worksheet cell? If so, how is that cell formatted? Or if not a cell, then where?
How are you subsequently accessing that date to use with sumif?
 
Upvote 0
Hi Jason, sorry for not providing that info, hopefully this can help:

The date is being printed to a worksheet cell which is formatted as a date.
I am then, in a different worksheet, using the SUMIF formula to only sum quantities between two dates.
 
Upvote 0
Best guess is that the formula is not written correctly,
using the SUMIF formula to only sum quantities between two dates.
For summing between 2 dates you will need sumifs, not sumif. Where are the 2 dates coming from? You have only mentioned one in your post.
The basic syntax of the formula would be something like this, which allows for any of the date cells containing times as well.
Excel Formula:
=SUMIFS(quanties,datelist,">="&INT(startdate),datelist,"<"&INT(enddate)+1)
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,862
Members
449,052
Latest member
Fuddy_Duddy

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