Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with Find

Im not the brightest when it comes writing macros, so this is probably
realy simple.

I want to find a certain value then have it selected so i can
manipulate other values in that row using offset() etc

This is my code so far but i get an error with the c.select

Dim myvalue As String
Sheet2.Activate

myvalue = Sheet2.Range("A2").Select

Sheet3.Activate

Set c = Sheet3.Range("A2:A457").Find(myvalue)

c.Select


Cheers

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Trouble with Find

Try this:

Sub Find_Value()
Dim myvalue As String
Dim rng As Range, c As Range

myvalue = Sheet2.Range("A2").Value
Sheet3.Activate

Set rng = Sheet3.Range("A2:A457")
Set c = rng.Cells.Find(myvalue)
c.Select
End Sub

Mike F
"vortex2k4" wrote in message
oups.com...
Im not the brightest when it comes writing macros, so this is probably
realy simple.

I want to find a certain value then have it selected so i can
manipulate other values in that row using offset() etc

This is my code so far but i get an error with the c.select

Dim myvalue As String
Sheet2.Activate

myvalue = Sheet2.Range("A2").Select

Sheet3.Activate

Set c = Sheet3.Range("A2:A457").Find(myvalue)

c.Select


Cheers



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
Trouble. Mark Charts and Charting in Excel 1 March 1st 09 04:20 AM
Value trouble!!! Sim Excel Worksheet Functions 2 August 28th 07 09:20 AM
bar of pie trouble mr tom Charts and Charting in Excel 4 August 2nd 07 02:04 PM
Trouble with Find Method Alan M Excel Programming 4 October 28th 05 02:34 PM
Im in trouble!!! Please Help!! JS JimmyS Excel Discussion (Misc queries) 1 June 19th 05 10:21 PM


All times are GMT +1. The time now is 09:04 PM.

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"