Dear Excel hero's
In want the count of the distinct values of the column based on my filter in the last row.
Based on my filter it should dynamically provide me the values.
Dear Excel hero's
In want the count of the distinct values of the column based on my filter in the last row.
Based on my filter it should dynamically provide me the values.
There may be a few heros here... but there are no mind readers.
Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).
1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!
2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.
3. Make sure that your desired solution is also shown (mock up the results manually).
4. Try to avoid using merged cells. They cause lots of problems!
Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
Attachment uploaded with the expected result. and example
ARRAY formula in C14
![]()
Please Login or Register to view this content.
Pl note
Array formula should be confirmed with Ctrl+Shift+Enter keys together.
If answere is satisfactory press * to add reputation.
This array formula:
=SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET($C$2,ROW($C$2:$C$14)-ROW($C$2),)),IF($C$2:$C$14<>"",MATCH($C$2:$C$14,$C$2:$C$14,0))),ROW($C$2:$C$14)-ROW($C$2)+1),1))
gives you the expected results.
Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.
You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.
Don't type the curly brackets yourself - it won't work...
Seems it is working, but when i filter less than are equal to 2000 in the example sheet, it shoul dgive answer 2, but it gives 1 which wrong.
Who are you talking to??????
I can see that mine gives 1... Why are you expecting 2 as the answer when both values <=2000 are from order number 1?????
Hi Glenn Kennedy
Seems it is working, but when i filter less than are equal to 2000 in the example sheet, it should give answer 2, but it gives 1 which wrong
=SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET($C$2,ROW($C$2:$C$14)-ROW($C$2),)),IF($C$2:$C$14<>"",MATCH($C$2:$C$14,$C$2:$C$14,0))),ROW($C$2:$C$14)-ROW($C$2)+1),1))
.
So.. Please answer my Q at post 8
Glenn Perfect, this solves my issue. thanks a lot.
You're welcome.
If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.
It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.
Glenn usually we do delete duplicates to get the distinct value. now you above formula sort the problem and it will automatically provide the answer.
Is there any other easy way to achieve. i just what the distinct values
I moved your table down a bit to make seeing the results easier...
=SUMPRODUCT(SUBTOTAL(103,OFFSET($C$5,ROW($C$5:$C$17)-ROW($C$5),0)))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks