Countifs between date range when looking at a table , not range

Godders199

Active Member
Joined
Mar 2, 2017
Messages
313
Office Version
  1. 2013
Hello, I am trying to get the following formula to work on a table that it imported into excel from a sequel report and loads as a table

=COUNTIFS(checksmart!$M:$M,'Mortgage RM Checks'!$A2,checksmart!$AP:$AP,"MPM",checksmart!$L:$L,">="&Instructions!$E$5,checksmart!L:L,"<="&Instructions!$E$6,checksmart!$T:$T,"",checksmart!$AC:$AC,"")

so it is counting any dates between the dates in E5 and E6 in column L where columns T an AC are blank.


however it does not seem to identify the dates in the table, if i change column L via text to columns it does, but some the date format is not consistant it seems to switch between 01/06/2018 and 06/01/2018.

If i just change formula to count non blank cells in calulates the correct number, its purely when i ask it to count between to dates it returns zero.

DO i need to change something in the formula when looking at a table?

Any help would be appreciated
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Ok so excel is not seing your dates as dates. Did you know you can do text to columns specifying the dates format? Text to columns-delimited-next-next-date radio button specifying correct format.
 
Upvote 0
OK, I have added the following code,

With ActiveSheet.UsedRange.Columns("l").Cells
.TextToColumns Destination:=.Cells(1), DataType:=xlFixedWidth, FieldInfo:=Array(0, xlYMDFormat)
.NumberFormat = "dd-mm-yyyy"
End With

which in the majority sorts my problem, however a it does not seem to capture every row for example
02-06-2018
16/02/2018
02-01-2018
13/02/2018
13/02/2018
02-02-2018
02-12-2018

<tbody>
</tbody><colgroup><col></colgroup>
so it has not formated 3 dates and therefore not counting these, is my code wrong?

16/02/2018

<tbody>
</tbody><colgroup><col></colgroup>
 
Upvote 0

Forum statistics

Threads
1,214,516
Messages
6,119,976
Members
448,934
Latest member
audette89

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