Display and count unique values in date range

alfik1

New Member
Joined
Jun 10, 2016
Messages
14
Hi all,

Im standing in front of the task (see picture attached) and I cannot to figure it out . Does anybody has idea how to achieve desired result based on the criterias defined?
The result should be done by fromula, not by pivot or vba. If possible, do not use any formula in data table...
Im using excel 2016
Many thanx for any idea

 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Maybe...


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][td="bgcolor: #DCE6F1"]
G
[/td][td="bgcolor: #DCE6F1"]
H
[/td][td="bgcolor: #DCE6F1"]
I
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td][/td][td]
Data​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
Results​
[/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td][/td][td]
A​
[/td][td]
B​
[/td][td][/td][td]
From​
[/td][td]
01/02/2018​
[/td][td][/td][td]
A​
[/td][td]
B​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td][/td][td]
111​
[/td][td]
01/02/2018​
[/td][td][/td][td]
Till​
[/td][td]
06/02/2018​
[/td][td][/td][td]
111​
[/td][td]
2​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td][/td][td]
222​
[/td][td]
02/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
222​
[/td][td]
4​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td][/td][td]
222​
[/td][td]
03/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
-​
[/td][td]
-​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td][/td][td]
222​
[/td][td]
04/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
-​
[/td][td]
-​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td][/td][td]
222​
[/td][td]
05/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
-​
[/td][td]
-​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
8
[/td][td][/td][td]
111​
[/td][td]
06/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
-​
[/td][td]
-​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
9
[/td][td][/td][td]
111​
[/td][td]
07/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
-​
[/td][td]
-​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
10
[/td][td][/td][td]
333​
[/td][td]
08/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
-​
[/td][td]
-​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
11
[/td][td][/td][td]
222​
[/td][td]
09/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
-​
[/td][td]
-​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
12
[/td][td][/td][td]
222​
[/td][td]
10/02/2018​
[/td][td][/td][td][/td][td][/td][td][/td][td]
-​
[/td][td]
-​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
13
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Array formula in H3 copied down
=IFERROR(INDEX(Data[A],SMALL(IF(FREQUENCY(IF(Data>=$F$2,IF(Data<=$F$3,MATCH(Data[A],Data[A],0))),ROW(Data[A])-MIN(ROW(Data[A]))+1),ROW(Data[A])-MIN(ROW(Data[A]))+1),ROWS(H$3:H3))),"-")
confirmed with Ctrl+Shift+Enter, not just Enter

Formula I3 copied down
=IF(H3="-","-",COUNTIFS(Data[A],H3,Data,">="&$F$2,Data,"<="&$F$3))

Hope this helps

M.
 
Upvote 0
Hi Phil,

I think function SUMIF() wont be enough, because I dont know the criterium (exact value) needed for this calculation.
I need to implement also LARGE function probably.
Also some other functions to have required result :confused:
 
Upvote 0
Hi Phil,

I think function SUMIF() wont be enough, because I dont know the criterium (exact value) needed for this calculation.
I need to implement also LARGE function probably.
Also some other functions to have required result :confused:

Have you tried the formulas in post 3?

M.
 
Upvote 0
Have you tried the formulas in post 3?

M.

Hi Marcelo, yes I already tried this formula.
On the picture you can see the result.
I substituted SMALL function with LARGE to have top 10 list, but it is sorting on base of values in the cells of data A. I would like to sort them on base how many times appears - see desired result in tle picture. Is it possible?

 
Upvote 0
No, but to put in descending order the top 10 requires a very complicated formula.
A helper column would be acceptable?

M.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
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