Count unique text values based on condition in another column

dodgeratcools

New Member
Joined
Feb 12, 2014
Messages
6
I want to create a summary from the following table : <o:p></o:p>
<o:p> </o:p>
Date<o:p></o:p>
Name<o:p></o:p>
Location<o:p></o:p>
19-feb<o:p></o:p>
John<o:p></o:p>
DS1<o:p></o:p>
19-feb<o:p></o:p>
John<o:p></o:p>
DS1<o:p></o:p>
19-feb<o:p></o:p>
John<o:p></o:p>
DS2<o:p></o:p>

<TBODY>
</TBODY>
<o:p> </o:p>
By adding a condition [if John made 3 observation cards at the same day , then each unique site will be considered as 1 site visit] so at the end it will look like the following table :<o:p></o:p>
<o:p> </o:p>
Name<o:p></o:p>
No. Of cards For February<o:p></o:p>
John<o:p></o:p>
2<o:p></o:p>
William<o:p></o:p>
1<o:p></o:p>
Mark<o:p></o:p>
2<o:p></o:p>

<TBODY> </TBODY>
<o:p> </o:p>
The register I am using for one year and have several sheets each sheet reflect a particular month , any idea whether it’s a formula to calculate this or a macro it will be great as long as it does the job<o:p></o:p>
Appreciate any help
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Have you thought about using a Pivot Table? You will probably need one for each sheet.
 
Upvote 0
Add a helper column at the end as below


Sheet1

*ABCD
1DateNameLocationHelper column
219/02/2014JohnDS10.33
319/02/2014JohnDS10.33
419/02/2014JohnDS20.33
519/02/2014JoanDS10.50
619/02/2014JoanDS20.50
720/02/2014JoanDS31.00
819/02/2014PeterDS21.00
920/02/2014PeterDS10.50
1020/02/2014PeterDS20.50

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
D2=1/COUNTIFS(B:B,B2,A:A,A2)
D3=1/COUNTIFS(B:B,B3,A:A,A3)
D4=1/COUNTIFS(B:B,B4,A:A,A4)
D5=1/COUNTIFS(B:B,B5,A:A,A5)
D6=1/COUNTIFS(B:B,B6,A:A,A6)
D7=1/COUNTIFS(B:B,B7,A:A,A7)
D8=1/COUNTIFS(B:B,B8,A:A,A8)
D9=1/COUNTIFS(B:B,B9,A:A,A9)
D10=1/COUNTIFS(B:B,B10,A:A,A10)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4



Then add a pivot table to it and put

the name in the row field
Date in the column field and
the helper column in the value/data field


In the column field you will likely have loads of dates for each month you are doing it for, to make this just be a month

select on of the sates on the pivot table and on the ribbon you should see pivot tools at the end, select options then group selection and select month (put in an appropriate start and end date)


you will get something like the below


Sheet4

*ABC
1
2
3Sum of Helper columnColumn Labels
4Row LabelsFeb
5Joan2
6John1
7Peter2
8
9
10

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:146px;"><col style="width:114px;"><col style="width:79px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,214,566
Messages
6,120,257
Members
448,952
Latest member
kjurney

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