Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Code wont work - help please

My code:
Appears to run through but does not produced the expected result, only
offsets from current cell.

Sheets("AUDIT_TRAIL_MONTHLY").Select
On Error Resume Next
Range("A13:A24").Find(What:=Range("D2"), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Offset(0, 1).Activate
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Code wont work - help please

Hi,

What do you expect it to do?

If it finds the value it will select the cell to the right and then end.
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Wes_A" wrote:

My code:
Appears to run through but does not produced the expected result, only
offsets from current cell.

Sheets("AUDIT_TRAIL_MONTHLY").Select
On Error Resume Next
Range("A13:A24").Find(What:=Range("D2"), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Offset(0, 1).Activate

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Code wont work - help please

hi
your code tells it to do that. remove the offset(0,1) from the find clause.

regards
FSt1

"Wes_A" wrote:

My code:
Appears to run through but does not produced the expected result, only
offsets from current cell.

Sheets("AUDIT_TRAIL_MONTHLY").Select
On Error Resume Next
Range("A13:A24").Find(What:=Range("D2"), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Offset(0, 1).Activate

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Code wont work - help please

Your code tested fine. Must be another problem.

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Wes_A" wrote in message
...
My code:
Appears to run through but does not produced the expected result, only
offsets from current cell.

Sheets("AUDIT_TRAIL_MONTHLY").Select
On Error Resume Next
Range("A13:A24").Find(What:=Range("D2"), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Offset(0, 1).Activate


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Code wont work - help please

What I mean is, it is not finding the matching data in the first place, sorry
if I wasn't clear in my question.

"Wes_A" wrote:

My code:
Appears to run through but does not produced the expected result, only
offsets from current cell.

Sheets("AUDIT_TRAIL_MONTHLY").Select
On Error Resume Next
Range("A13:A24").Find(What:=Range("D2"), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Offset(0, 1).Activate



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Code wont work - help please

What I mean is, it is not finding the matching data in the first place

Then your data isn't a match. Check for rogue leading/trailing spaces
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Wes_A" wrote:

What I mean is, it is not finding the matching data in the first place, sorry
if I wasn't clear in my question.

"Wes_A" wrote:

My code:
Appears to run through but does not produced the expected result, only
offsets from current cell.

Sheets("AUDIT_TRAIL_MONTHLY").Select
On Error Resume Next
Range("A13:A24").Find(What:=Range("D2"), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Offset(0, 1).Activate

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Code wont work - help please

Can you give us an example of data it won't find?

--
Rick (MVP - Excel)



"Wes_A" wrote in message
...
What I mean is, it is not finding the matching data in the first place,
sorry
if I wasn't clear in my question.

"Wes_A" wrote:

My code:
Appears to run through but does not produced the expected result, only
offsets from current cell.

Sheets("AUDIT_TRAIL_MONTHLY").Select
On Error Resume Next
Range("A13:A24").Find(What:=Range("D2"), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Offset(0, 1).Activate


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
why is there a { in my formula and why wont it work? Gorgsey Excel Discussion (Misc queries) 6 March 19th 09 03:17 AM
Function wont work!? Jonas Excel Programming 1 March 6th 06 04:24 PM
Anyone know why this wont work? Mark Stephens Excel Programming 2 June 13th 05 06:08 AM
Conditional formatting code wont work Robert Hargreaves[_2_] Excel Programming 5 June 5th 05 08:40 PM
Why wont this code work? Mark Stephens[_3_] Excel Programming 1 April 30th 05 07:01 PM


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