Hi,
i attached a sample.. could you please help me.. i cant seem to figure out the formula..
i want to count only the working days from List, say if i have same date 5 or 10 times in range, it should counted as one day.
i also tried count or counta formulas, didnt seem to work.
I need a solution for subtotal.. if i filter a month or different criteria it should show at the top the counted days..
also the pivot dont seem to work aswell..
Thanks for helping me
happy new year
Last edited by Sultix; 01-06-2012 at 10:55 PM.
On Sheet1, add this formula into a helper column (call it Unique Count or whatever)
=IF(COUNTIF($B$4:B4,B4)>1,0,COUNTIF($B$4:B4,B4))
Copy it down the column
Reset the Pivot Table to include the new column, then add the Unique Count to the Values field and change the field setting to SUM (not count).
Or to use the SUBTOTAL function with the filter on sheet1,
=SUBTOTAL(9,J4:J223)
Where column-J is the helper column
Last edited by Palmetto; 12-30-2011 at 08:28 PM.
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Look at this thread in another forum for a solution.
http://www.mrexcel.com/forum/showthread.php?t=70835
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Hi sultix,
A very happy new year to you and your loved ones .. cheers
See the attached file where I have given a try solving your query. Let me know if this helps.
Regards,
DILIPandey
<click on below 'star' if this helps>
DILIPandey
+919810929744
dilipandey@gmail.com
I would suggest:
1 - add a SUBTOTAL for each line on your table (hide column as necessary)
K4: =SUBTOTAL(2,B4)
copied down to K223
2 - use a single SUMPRODUCT with COUNTIFS (possible given your version)
E1: =SUMPRODUCT($K$4:$K$223/COUNTIFS($K$4:$K$223,$K$4:$K$223&"",$B$4:$B$223,$B$4:$B$223&""))
The above would generate 13 | 8 | 9 for Sep, Oct & Nov respectively - and would work regardless of which filters you apply (i.e not exclusive to month selection).
Last edited by XLent; 12-31-2011 at 01:57 AM.
This Array Formula will give the count of unique in filtered range.
=SUM(SIGN(FREQUENCY(IF(SUBTOTAL(2,OFFSET(B4,ROW(B$4:B$223)-ROW(B4),)),B$4:B$223),B$4:B$223)))
Or, as Palmetto said, use this formula in a helper column & use as SUBTOTAL(9,...) also add this column in pivot table.
=(COUNTIF(B$4:B4,B4)=1)+0
HTH; Haseeb
If your problem is solved, please say so clearly, and mark your thread as Solved:
Forum Rules & How to Mark a thread as SOLVED
Hi fellow contributors,
all four methods works perfectly.. i have now so many different methods for different methods or results
i never thought about helper column, there is also another way with =IF(B4=B5;0;1) in helper column, and then sum it with subtotal formula.
thanks for all your help..
@haseeb, your formula looks similar to dilipantey, i will try that tomorrow
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks