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: 3
Default Why isn't this macro giving me proper results?

Good Morning,

Can someone please look in and spot the problem. Basixcally what I'm trying
to do here is to filter a range of dates.

But what actually happens when I run this code is that the Excel filters for
"From1" and "To1" literally (as text/string) and not for values stored in
these range variables.

Solution Please.....

Sub Macro3()
Dim From1, To1 As Range
With Application
.Calculation = xlManual
.MaxChange = 0.001
End With
Set From1 = Worksheets("Individual").Range("E45")
Set To1 = Worksheets("Individual").Range("K45")
Sheets("Quality Check Log").Select
Range("A3").Select
Selection.AutoFilter Field:=1, Criteria1:="=From1", Operator:=xlAnd,
Criteria2:="<=To1"
End Sub


--
Thanks,
Girish
Bangalore, India
 
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
Comparing two columns , and giving comparison results in a third. Colin Hayes Excel Worksheet Functions 6 January 3rd 09 12:43 AM
TRUNC zero giving odd results? [email protected] Excel Worksheet Functions 5 August 24th 06 05:26 PM
Very large workbook now giving incorrect results :( [email protected] Excel Discussion (Misc queries) 0 July 17th 06 11:29 PM
Equation giving unexpected results Mike K Charts and Charting in Excel 2 January 27th 05 02:58 PM
GetAttr giving unexpected results Janelle Excel Programming 4 November 21st 03 08:58 PM


All times are GMT +1. The time now is 11:12 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"