Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count result output to other sheet

Hi People,

What i require is the results i get from the below code to be place i
sheet2.

So when the count says 13 of 42 the number 13 is placed in cell A4 i
sheet2

'--------------------------------------------------------------------------------

Dim rng As Range
Dim strStart As String

Sheets("Telephone Stats").Select

Set rng = ActiveSheet.AutoFilter.Range

strStart = InputBox("Please enter start date, (dd/mm/yyyy)", "Extrac
Maker: Start Date")
Selection.AutoFilter Field:=7, Criteria1:="="
CLng(CDate(strStart)), Operator:=xlAnd, _
Criteria2:="<=" & CLng(CDate(strStart))

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

ActiveSheet.ShowAllData

Sheets("Manager Checks").Select

'-------------------------------------------------------------------------------

Regards
Pau

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Count result output to other sheet


add

Worksheets("Sheet2").Range("A4").Value = Columns(1). _
SpecialCells(xlVisible).Count - 1

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"pauluk " wrote in message
...
Hi People,

What i require is the results i get from the below code to be place in
sheet2.

So when the count says 13 of 42 the number 13 is placed in cell A4 in
sheet2


'---------------------------------------------------------------------------
-----

Dim rng As Range
Dim strStart As String

Sheets("Telephone Stats").Select

Set rng = ActiveSheet.AutoFilter.Range

strStart = InputBox("Please enter start date, (dd/mm/yyyy)", "Extract
Maker: Start Date")
Selection.AutoFilter Field:=7, Criteria1:="=" &
CLng(CDate(strStart)), Operator:=xlAnd, _
Criteria2:="<=" & CLng(CDate(strStart))

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

ActiveSheet.ShowAllData

Sheets("Manager Checks").Select


'---------------------------------------------------------------------------
----

Regards
Paul


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count result output to other sheet

Bob thanks for this but one problem now.

Instead of the value in the cell being say 4 it is given me th
following 65521

Can you help

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Count result output to other sheet

Sorry, missed a bit. Try this instead


Worksheets("Sheet2").Range("A4").Value = rng.Columns(1). _
SpecialCells(xlVisible).Count - 1

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"pauluk " wrote in message
...
Bob thanks for this but one problem now.

Instead of the value in the cell being say 4 it is given me the
following 65521

Can you help?


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



Reply
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
average hourly output for date, result shown by day Morgan New Users to Excel 5 November 6th 09 03:28 AM
Two-variable Data Table - Problem with result/output Chanpheng Botham Excel Worksheet Functions 1 May 7th 08 10:20 PM
output negative result will show zero value oldLearner57 Excel Discussion (Misc queries) 4 April 23rd 08 11:44 AM
Help getting output value from another sheet [email protected] Excel Discussion (Misc queries) 1 January 15th 08 09:49 AM
how do I output result of formula to another cell? Francois Excel Discussion (Misc queries) 3 November 24th 06 03:02 PM


All times are GMT +1. The time now is 01:10 PM.

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"