SUMIF com Range de Data

rodmorais

New Member
Joined
May 17, 2020
Messages
4
Office Version
365
Platform
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,
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

The_Macrotect

Board Regular
Joined
Dec 11, 2017
Messages
89
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
A
B
1
5/26/20205/26/2020 13:16
2
5/26/20205/26/2020 13:20
3
5/26/20205/26/2020 14:51
4
5/26/20205/26/2020 16:04
5
5/27/20205/27/2020 10:11
6
5/27/20205/27/2020 10:36
Sheet: Sheet1

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
 

Watch MrExcel Video

Forum statistics

Threads
1,102,657
Messages
5,488,123
Members
407,625
Latest member
Alanacran

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top