Is there any way to
COUNTIF it’s the current date?
For example I have a spreadsheet with work orders, once the employee starts the work order it captures a time stamp, after the work order is completed it is moved to an archive, well I wanted to create a summary sheet that tells me how many orders we have done for that date, the format of the time stamp is:
So basically I need a
COUNTIF to count the column for the current date.
Is this possible?
You would need to apply a function first on the range, which then makes
COUNTIF not an appropriate function to count those dates matching ‘today’. You can use
INT strips out the time from the datetime.
The new version of Google Sheets has COUNTIFS, which would allow
You need to opt in to the new version to make it work, though. (“Try the new Google Sheets”)
If you don’t have
COUNTIFS available, as per
maybeWeCouldStealAVan's suggestion, then you can use two
COUNTIF functions like this
by counting all entries greater than or equal to today then subtracting all those greater than or equal to tomorrow the result is a count of those on today’s date only
That formula will work in Excel or google – another option, similar to Jerry’s is to use this googledocs specific formula
dim i as integer dim objDate as date dim objStartDate as Date dim objEndDate as Date dim countOrders as integer countOrders = 1 objStartDate = 'the start date to check with ( could be the start of the day) objEndDate = 'the end date to check with (could be the end of the day) for i = 1 to 'number of rows objDate = CDate(cells(i, 1)) if (objDate > objStartDate) and (objDate < objEndDate) then countOrders = countOrder +1 end if next i