• 540K Members
• 3,192 Online
• 644K Conversations

## Modifying formula based on Date and time

Highlighted
Occasional Contributor

# Modifying formula based on Date and time

Dear All,
Please modify  the highlighted bold formula that gives the result in such a way.

=SUM(COUNTIFS(RM!\$F:\$F,\$D25,RM!\$H:\$H,{"COMP","CLOSE","WCLOSE"},RM!\$I:\$I,">="&DATE(2018,12,1),RM!\$I:\$I,"<="&EOMONTH(DATE(2018,12,1),0)))

1. RM!\$I:\$I,">="&DATE(2018,12,1)  It will calculate based on 1dec 2018 time 00:59:59.000 am (hh:mm:ss.mmm)
2.
RM!\$I:\$I,"<="&EOMONTH(DATE(2018,12,1) It will calculate based on 31dec 2018 time 23:59:59.000 pm

Thanks

Regards,
aligahk06

Highlighted

# Re: Modifying formula based on Date and time

Hi Abdul,

You may add TIME to calculations like

```(DATE(2018,12,1)+TIME(0,59,59))

(EOMONTH(DATE(2018,12,1),0)+TIME(23,59,59))
```

Related Conversations
Date format in Stream
Dave Pyett in Microsoft Stream Forum on
2 Replies
Leap year formula
Hattsoff in Excel on
4 Replies
Totaling using two sets of data
dazedandconfused in Excel on
2 Replies