SOLVED

Summing values based on certain time?

Copper Contributor

Summing values based on certain time?

Is it possible WITHOUT using VBA to sum values if it's not a certain time on the clock (the live computer clock). For example, if before 6pm sum values and if after 6pm don't. I'd assume you have to use the now() function in someway to do this.

Ex

50

50

50

If before 6pm it should be 150. If after 6pm it should be 0. The time will change/update since its based on the current time (not a value listed on a spreadsheet).

Thanks!

2 Replies
best response confirmed by J-Des000 (Copper Contributor)
Solution

Re: Summing values based on certain time?

@J-Des000 You may try-

``=IF(TIMEVALUE(TEXT(NOW(),"hh:mm:ss"))<TIME(6,0,0),SUM(A1:A3),0)``

Re: Summing values based on certain time?

A similar formula but without any conversion to text

``= IF(MOD(NOW(),1)<TIME(6,0,0), SUM(values), 0)``
1 best response

Accepted Solutions
best response confirmed by J-Des000 (Copper Contributor)
Solution

Re: Summing values based on certain time?

@J-Des000 You may try-

``=IF(TIMEVALUE(TEXT(NOW(),"hh:mm:ss"))<TIME(6,0,0),SUM(A1:A3),0)``