Dear Surya, SAM is right........ but ............If you want to Count only Date............
Please try it and see attached sheet..i hope it will help to u Function Countonly_date(rng As Range) For Each abc In rng If IsDate(abc) Then Countonly_date = Countonly_date + Application.WorksheetFunction.CountA(abc) End If Next End Function -- Thanks & regards, Noorain Ansari *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> *http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/> On Mon, Oct 17, 2011 at 8:50 PM, Mr Excellent <suryaprasad...@gmail.com>wrote: > Hi All, > > I have three different dates in a Column A , suppose say in Col A i have A1 > as 1- Dec -2010, A2 as 11- Jan-2011,A3 as 1- Mar -2011 then i need a count > of number days as *3* in the cell A4 any idea? > > Thanks > Prasad. > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
Count_Only_Date.xls
Description: MS-Excel spreadsheet