Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Minimum qualifiers to Find (VBA) the actual last used Row, Column

2003

Have played with the following VBA code arguments but all seem to give
same result whether included or excluded:

Cells.Find( _
What:="*", _
after:=ActiveSheet.Cells(1, 1), _
LookIn:=xlFormulas, _
lookat:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows) _
.Row

What is the minimum set of arguements to always fine the last used row?


Why does not appear to make any difference to the end result, if I
include or exclude the following - what am I missing?
after:=ActiveSheet.Cells(1, 1), _
LookIn:=xlFormulas, _
lookat:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows) _
.Row

Thanks, EagleOne

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Minimum qualifiers to Find (VBA) the actual last used Row, Column

Excel and VBA work together with .Find. They each remember the parameters in
the previous Find (either manually or via code).

Because of this, your testing is just testing the last set of parms that were
used. And that's one very good reason to specify all the parms you want--if you
don't specify them, then you'll be trusting that the last Find that was done
used the same parms as the ones you want.



EagleOne wrote:

2003

Have played with the following VBA code arguments but all seem to give
same result whether included or excluded:

Cells.Find( _
What:="*", _
after:=ActiveSheet.Cells(1, 1), _
LookIn:=xlFormulas, _
lookat:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows) _
.Row

What is the minimum set of arguements to always fine the last used row?

Why does not appear to make any difference to the end result, if I
include or exclude the following - what am I missing?
after:=ActiveSheet.Cells(1, 1), _
LookIn:=xlFormulas, _
lookat:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows) _
.Row

Thanks, EagleOne


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Minimum qualifiers to Find (VBA) the actual last used Row, Column

Very interesting!

Dave, what other Excel/VBA functions "remember" previous settings?

EagleOne


Dave Peterson wrote:
Excel and VBA work together with .Find. They each remember the parameters in
the previous Find (either manually or via code).

Because of this, your testing is just testing the last set of parms that were
used. And that's one very good reason to specify all the parms you want--if you
don't specify them, then you'll be trusting that the last Find that was done
used the same parms as the ones you want.



EagleOne wrote:

2003

Have played with the following VBA code arguments but all seem to give
same result whether included or excluded:

Cells.Find( _
What:="*", _
after:=ActiveSheet.Cells(1, 1), _
LookIn:=xlFormulas, _
lookat:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows) _
.Row

What is the minimum set of arguements to always fine the last used row?

Why does not appear to make any difference to the end result, if I
include or exclude the following - what am I missing?
after:=ActiveSheet.Cells(1, 1), _
LookIn:=xlFormulas, _
lookat:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows) _
.Row

Thanks, EagleOne


--

Dave Peterson


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Minimum qualifiers to Find (VBA) the actual last used Row, Column

I don't know.

I do know that data|text to columns tries to help when you do it one time, then
paste from a different application.

EagleOne wrote:

Very interesting!

Dave, what other Excel/VBA functions "remember" previous settings?

EagleOne

Dave Peterson wrote:
Excel and VBA work together with .Find. They each remember the parameters in
the previous Find (either manually or via code).

Because of this, your testing is just testing the last set of parms that were
used. And that's one very good reason to specify all the parms you want--if you
don't specify them, then you'll be trusting that the last Find that was done
used the same parms as the ones you want.



EagleOne wrote:

2003

Have played with the following VBA code arguments but all seem to give
same result whether included or excluded:

Cells.Find( _
What:="*", _
after:=ActiveSheet.Cells(1, 1), _
LookIn:=xlFormulas, _
lookat:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows) _
.Row

What is the minimum set of arguements to always fine the last used row?

Why does not appear to make any difference to the end result, if I
include or exclude the following - what am I missing?
after:=ActiveSheet.Cells(1, 1), _
LookIn:=xlFormulas, _
lookat:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows) _
.Row

Thanks, EagleOne


--

Dave Peterson


--

Dave Peterson
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
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Lookup Table Dilemma Karen Excel Worksheet Functions 2 June 10th 05 08:22 PM
How to find which column or row the Min() value is coming from Luanne Excel Discussion (Misc queries) 4 April 29th 05 08:32 PM
need to find which numbers (3+) in a column sum to a value Devin Excel Discussion (Misc queries) 1 February 11th 05 10:30 PM


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