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: 573
Default starting from bottom of range instead of top

I wrote the following code:

Set wsCtyLst = Workbooks("Mark Top 10.xls").Worksheets("CtyLst")

Set wsSrc = ActiveSheet
'sWhichTop = _
'InputBox("Please enter 10 or 21 to determine which counties you want
extracted", , 10)
'REPLACE with code to determine which table to use
Set rCtyLst = wsCtyLst.Range("C2:C11")
Workbooks("Mark Top 10.xls").Activate
wsCtyLst.Select
rCtyLst.Select

Workbooks("Top Ten Extract Test.xls").Activate

sCtySrcCol = InputBox("Please enter the column where the counties are
currently listed", _
, "A")
sColMrk10 = InputBox("Please enter the column to mark the Top Ten
Counties", "E")


'TEST for valid entries on both variables
'TEST sColMrk10 for existing data


' TEST for county numbers/names or names

With wsSrc
Set rCtySrc = .Range(.Cells(2, sCtySrcCol), _
.Cells(2, sCtySrcCol).End(xlDown))
End With

wsSrc.Select
rCtySrc.Select

Set rFndCell = Cells.Find(What:=rCtyLst, _
After:=ActiveCell, _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False)

I want it to start searching rCtySrc using the first value in rCtyLst,
but it uses the last value. How to I tell it to search from the top
down?
Thanks!

 
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
FORMULA for COUNTING #S STARTING WITH A 4 IN A RANGE 1 TO 100,000 dbglass Excel Worksheet Functions 2 May 12th 06 08:28 PM
Dynamic chart that displays a range starting today jimfrog Charts and Charting in Excel 2 March 23rd 06 06:36 PM
Scroll bar starting at bottom of form Adamaths[_10_] Excel Programming 2 March 1st 06 09:24 AM
Scrollbars starting at the bottom of form cparsons Excel Discussion (Misc queries) 0 July 31st 05 01:54 AM
How to: Add blank row at bottom of range Brad Clarke Excel Programming 2 November 30th 03 10:20 PM


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

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

About Us

"It's about Microsoft Excel"