SUMIF com Range de Data

rodmorais

New Member
Joined
May 17, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Prezados,

Tenho uma tabela que na coluna A temos data no formato abaixo:

2020/05/26 13:16:29
2020/05/26 13:20:58
2020/05/26 14:51:13
2020/05/26 16:04:46
2020/05/27 10:11:45
2020/05/27 10:36:10

Tenho várias ocorrências cuja data é no mesmo dia, então quero somar todas as ocorrências de um mesmo dia. Estou usando a formula =sumif(A3:A,TODAY(),M3:M) ou =sumif(A3:A,"2020/05/26",M3:M) mas está retornando zero. Onde estou errando? Será que o fato da hora estar presente está atrapalhando?

Agradeço antecipadamente,
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hello,

There may be multiple ways to do this, but this was what I came up with:

1) Insert a helper column before column A

Insert Column.jpg



2) In Cell A1, type the formula:
Code:
=TEXT(LEFT(B1,LEN(B1)),"m/dd/yyyy")


This formats all of the data without the time. Your worksheet should now look like this:
Excel 2007 32 bit
[Table="width:, class:head"][tr=bgcolor:rgb(136, 136, 136)][th] [/th][th]
A
[/th][th]
B
[/th][/tr]
[tr=bgcolor:rgb(255, 255, 255)][td=bgcolor:rgb(136, 136, 136)]
1
[/td][td]5/26/2020[/td][td]5/26/2020 13:16[/td][/tr]

[tr=bgcolor:rgb(255, 255, 255)][td=bgcolor:rgb(136, 136, 136)]
2
[/td][td]5/26/2020[/td][td]5/26/2020 13:20[/td][/tr]

[tr=bgcolor:rgb(255, 255, 255)][td=bgcolor:rgb(136, 136, 136)]
3
[/td][td]5/26/2020[/td][td]5/26/2020 14:51[/td][/tr]

[tr=bgcolor:rgb(255, 255, 255)][td=bgcolor:rgb(136, 136, 136)]
4
[/td][td]5/26/2020[/td][td]5/26/2020 16:04[/td][/tr]

[tr=bgcolor:rgb(255, 255, 255)][td=bgcolor:rgb(136, 136, 136)]
5
[/td][td]5/27/2020[/td][td]5/27/2020 10:11[/td][/tr]

[tr=bgcolor:rgb(255, 255, 255)][td=bgcolor:rgb(136, 136, 136)]
6
[/td][td]5/27/2020[/td][td]5/27/2020 10:36[/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet1[/td][/tr][/table]

3) Now use this formula to count each time a certain date occurs:
Code:
=COUNTIF(A1:A6,"5/26/2020")


4) Hide Column A (Optional)
Hide Column.jpg



Final product:
Final.jpg
 
Upvote 0

Forum statistics

Threads
1,223,933
Messages
6,175,470
Members
452,646
Latest member
tudou

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