excelbytes
Active Member
- Joined
- Dec 11, 2014
- Messages
- 251
- Office Version
- 365
- Platform
- Windows
I'm working with values that are entered on various days and at various times. I'm trying to calculate the data to exclude anything that falls between 10:00 am and 12:00 noon. I need to SUMIFS, COUNTIFS, etc., but Excel doesn't allow me to enter two time criteria in the same formula, so what I found myself doing is a formula such as this:
=SUMIFS(TradeProfit,Trades!$D$2:$D$1001,G27,$H$2:$H$1001,"<=10:00:00")+SUMIFS(TradeProfit,Trades!$D$2:$D$1001,G27,$H$2:$H$1001,">11:59:59")
In the above, the range in column "D" are dates, and G27 is a specific date, and the range in column "H" is the entry time.
Is there a way to have both these criteria in the same formula? If not, the above works for summing and counting, but I'm not sure how to accomplish this when I have to find the MIN or MAX in a range excluding that time period.
I know I'm missing something here, but not sure the best approach.
Thanks in advance for your help.
=SUMIFS(TradeProfit,Trades!$D$2:$D$1001,G27,$H$2:$H$1001,"<=10:00:00")+SUMIFS(TradeProfit,Trades!$D$2:$D$1001,G27,$H$2:$H$1001,">11:59:59")
In the above, the range in column "D" are dates, and G27 is a specific date, and the range in column "H" is the entry time.
Is there a way to have both these criteria in the same formula? If not, the above works for summing and counting, but I'm not sure how to accomplish this when I have to find the MIN or MAX in a range excluding that time period.
I know I'm missing something here, but not sure the best approach.
Thanks in advance for your help.