98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Functions
Functions
Resolved · High Priority · Version 2003
Olufunke has attended:
Access VBA course
Excel VBA Intro Intermediate course
Functions
how to do unique counts
RE: functions
Hi Olufunke
Thank you for your question
Could you please clarify the following for me
1. What is it you are counting?
2. Are you working in Access or Excel
Thanks
Stephen
RE: functions
Hi Olufunke,
This question has now been left unattended for a while.
We like to keep down the large number of active forum posts we receive.
As we are waiting for your response for further information to help resolve your issue, we will be automatically marking this question as resolved in the next 5 days (unless you post a follow-up within that time).
We look forward to hearing from you.
Thank you.
Regards, Rich
RE: functions
The count is in Excel
1. A client might have more than one records
2. I might filter for certain parament,, based on that parameter I also want to do a unique count on the remainder of the records
Hope this makes sense
Regards
Funke
RE: functions
Hi Olufunke
Thanks for the update
If I understand correctly you want to filter your record on a certain criteria (e.g. Client Name) and then count how many records there are that match this. You then also want to know how many additional records there are.
This is quiet a complex thing to do in code, but the general strategy would be to:
1. Use the count method of the rows collection of the current region to determine how many records there are in total, and assign this to a variable (intTotalCount)
2. Use the filter method of the selection object to filter the data. (I suggest recording a macro to see the code for this)
3. Then repeat step 1 for the filtered data saving that to a variable(intFilterCount)
IntFilterCount will give you the number of items in the filtered data and that less intTotalCount will give you the balance
If you have any problems please do follow up to my post
Regards
Stephen
Mon 30 Nov 2009: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Customize the toolbar in Excel 2010You can create your own toolbar which contains your favourite or most used tools. This will make using Excel much more efficient. To do this, you need to click on View, then select Customize Quick access Toolbars and then select Customize. A list of tools will then appear on the screen of which you can add or remove them as you please. |