LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Criteria Fliter then Count results

Hi,

This what i require to do is after an input box pops up enter a dat
this then filters the criteria for that date and counts how man
results are ther.

The code i am using is below but i have problems. If a use text it i
fine and works but when i chage the code for a date it doesn't the dat
code is below.

Dim rng As Range
Dim rng2 As Range
Dim strCheck As String

Sheets("Telephone Stats").Select

strCheck = Application.InputBox("Please enter date you require data fo
(date must be enter dd/mm/yyyy)", "Manager Checks")

Selection.AutoFilter Field:=7, _
Criteria1:="=" & CLng(CDate(strCheck))

Set rng = ActiveSheet.AutoFilter.Range

MsgBox rng.Columns(1). _
SpecialCells(xlVisible).Count - 1 _
& " of " & rng _
.Rows.Count - 1 & " Records"

Sheets("Manager Checks").Select

End Su

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ms excel 2007 (Fliter and merge issue) Lawrence[_2_] Setting up and Configuration of Excel 5 August 5th 09 11:49 AM
Copy and paste when in fliter lalann Excel Discussion (Misc queries) 2 July 29th 09 08:49 AM
Sum after Filter, Count after Fliter Jimmie Excel Worksheet Functions 2 December 24th 08 04:44 PM
i can not fliter unique records i can not fliter unique records Excel Worksheet Functions 0 August 25th 05 07:07 PM
criteria 1(a,b,c), criteria 2 (T,F) - Results (3 answers) achievab Kikkoman Excel Discussion (Misc queries) 5 July 1st 05 11:05 PM


All times are GMT +1. The time now is 02:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"