My friend I wanted to get unique count & not just simple count with condition.
Best Regards, Amit From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Paul Schreiner Sent: 10 April 2012 23:46 To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Unique count for a date & between range You didn't say which range of cells you're checking for the date or date range... so, I had to make some assumptions. First of all, to make it flexible, I changed the date and date range to separate cells in columns F and G. so it looks like: Unique count of Cabs 3/12/2012 Unique count of Cabs 3/12/2012 3/21/2012 Next, you need to keep in mind that in Excel, dates are NUMBERS. In fact, it's the number of days since 1/1/1900. TIME is the fractional part of a day. 6:00 am is 6 hours of a 24 hour day, or .25 days. 12:00am is 1/2 of a day, or .50 days. So, 6:00am on 12-Mar-2012 is 40980.25 So, first, you have to stop thinking of the dates as DATE and think of them as NUMBERS. So, for EXACTLY 12-Mar-2012, what you're really asking is how many cells are greater than 40980 and less than 40981 Now, if you have Excel 2007 or 2010, you can use a =countifs function that allows multiple selection criteria. instead, if you're using an earlier verision you'll want to count the number of cells Greater than 40980, then subtract the number of cells greater than one more than that (40980+1 = 40981) That is the same as asking how many have a date after 12-Mar-2012 (midnight) and subract the number that are after midnight of 13-Mar-2012. If the cells you're checking are in column H, then The formula for that is: =COUNTIF($H$4:$H$9,">"&F11)-COUNTIF($H$4:$H$9,">"&F11+1) Similarly, if you're looking for dates within a range, it starts the same way, but the date you're calculating to subtract is from the other cell: (example: begin date is in F12, ending date is in G12. If you want to INCLUDE the cells with date=G12, then be sure to use +1, otherwise, leave off the +1) =COUNTIF($H$4:$H$9,">"&F12)-COUNTIF($H$4:$H$9,">"&G12+1) hope this helps, Paul ----------------------------------------- "Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can." - John Wesley ----------------------------------------- ________________________________ From: Amit Desai (MERU) <amit.de...@merucabs.com> To: excel-macros@googlegroups.com Sent: Tue, April 10, 2012 1:11:35 PM Subject: RE: $$Excel-Macros$$ Unique count for a date & between range Hi, Please check the sample file. I need unique cab count for a date & unique cab count for a date range. Please let me know the formula. Best Regards, Amit From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Rajan_Verma Sent: 10 April 2012 22:07 To: excel-macros@googlegroups.com Subject: RE: $$Excel-Macros$$ Unique count for a date & between range Please see the attached file Rajan From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Maries Sent: Apr/Tue/2012 09:58 To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Unique count for a date & between range Hi, Consider, Dates Range is A1:A10, Try this array formula, (Apply with Ctrl+Shift+Enter) =SUM(--(COUNTIF(A1:A10,A1:A10)=1)) Regards, MARIES. On Tue, Apr 10, 2012 at 8:07 PM, Amit Desai (MERU) <amit.de...@merucabs.com<mailto:amit.de...@merucabs.com>> wrote: Dear All, Please help to calculate unique count for a date & for a date range. Best Regards, Amit ________________________________ Disclaimer: This message and its attachments contain confidential information and may also contain legally privileged information. This message is intended solely for the named addressee. If you are not the addressee indicated in this message (or authorized to receive for addressee), you may not copy or deliver any part of this message or its attachments to anyone or use any part of this message or its attachments. Rather, you should permanently delete this message and its attachments (and all copies) from your system and kindly notify the sender by reply e-mail. Any content of this message and its attachments that does not relate to the official business of Meru Cab Company Pvt. Ltd. must be taken not to have been sent or endorsed by any of them. Email communications are not private and no warranty is made that e-mail communications are timely, secure or free from computer virus or other defect. -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com<mailto:excel-macros@googlegroups.com> -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com<mailto:excel-macros@googlegroups.com> -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com ________________________________ Disclaimer: This message and its attachments contain confidential information and may also contain legally privileged information. This message is intended solely for the named addressee. If you are not the addressee indicated in this message (or authorized to receive for addressee), you may not copy or deliver any part of this message or its attachments to anyone or use any part of this message or its attachments. Rather, you should permanently delete this message and its attachments (and all copies) from your system and kindly notify the sender by reply e-mail. Any content of this message and its attachments that does not relate to the official business of Meru Cab Company Pvt. Ltd. must be taken not to have been sent or endorsed by any of them. Email communications are not private and no warranty is made that e-mail communications are timely, secure or free from computer virus or other defect. -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com ________________________________ Disclaimer: This message and its attachments contain confidential information and may also contain legally privileged information. This message is intended solely for the named addressee. If you are not the addressee indicated in this message (or authorized to receive for addressee), you may not copy or deliver any part of this message or its attachments to anyone or use any part of this message or its attachments. Rather, you should permanently delete this message and its attachments (and all copies) from your system and kindly notify the sender by reply e-mail. Any content of this message and its attachments that does not relate to the official business of Meru Cab Company Pvt. Ltd. must be taken not to have been sent or endorsed by any of them. Email communications are not private and no warranty is made that e-mail communications are timely, secure or free from computer virus or other defect. -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com