countifs problem

Lukas C

New Member
Joined
Nov 9, 2016
Messages
24
[TABLE="width: 297"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]last visit[/TD]
[TD]more booked[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]01/01/2019[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]16/01/2019[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]01/07/2018[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Chris[/TD]
[TD="align: right"]01/07/2018[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Chris[/TD]
[TD="align: right"]01/08/2018[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Chris[/TD]
[TD="align: right"]01/01/2019[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]

looking for formula to count if active person within 30 days or if more that 30 days but have booked appointment also count that person
i used that but is wrong
=COUNTIFS($B$2:$B$7,">"&TODAY()-30,$C$2:$C$7,">0")
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi, you could try:

=COUNTIFS($B$2:$B$7,">"&TODAY()-30)+COUNTIFS($B$2:$B$7,"<="&TODAY()-30,$C$2:$C$7,">0")
 
Upvote 0
it give we wrong count 4 instead of 5

Hi, it returns 5 for me based on your sample data?


Excel 2013/2016
ABCDE
1Namelast visitmore bookedformula
2John01/01/201915
3John16/01/2019
4John01/07/20181
5Chris01/07/2018
6Chris01/08/20181
7Chris01/01/2019
Sheet1
Cell Formulas
RangeFormula
E2=COUNTIFS($B$2:$B$7,">"&TODAY()-30)+COUNTIFS($B$2:$B$7,"<="&TODAY()-30,$C$2:$C$7,">0")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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