Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default copy active cell value,find the pasted value in different worksheet

hi,

I am trying to put together a simple macro to do the following job - so
far I haven't succeeded:

copy active cell value,go to the first worksheet in my spreadsheet,
find the pasted value in there and select the row where it has found
the value.

can anyone help?

Thx.

Tom

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default copy active cell value,find the pasted value in different worksheet

Tom,

Sub TomFind()
Dim myVal As Variant
On Error GoTo NotFound
myVal = ActiveCell.Value
Worksheets(1).Activate
Cells.Find(myVal).EntireRow.Select
Exit Sub

NotFound:
MsgBox "That value wasn't found on Worksheet 1"
End Sub

HTH,
Bernie
MS Excel MVP


wrote in message
oups.com...
hi,

I am trying to put together a simple macro to do the following job - so
far I haven't succeeded:

copy active cell value,go to the first worksheet in my spreadsheet,
find the pasted value in there and select the row where it has found
the value.

can anyone help?

Thx.

Tom



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default copy active cell value,find the pasted value in different worksheet

Bernie,

thanks a lot.

it does the job perfectly and at the same time it's very short and
simple macro.

Cheers.

Tom

Bernie Deitrick wrote:
Tom,

Sub TomFind()
Dim myVal As Variant
On Error GoTo NotFound
myVal = ActiveCell.Value
Worksheets(1).Activate
Cells.Find(myVal).EntireRow.Select
Exit Sub

NotFound:
MsgBox "That value wasn't found on Worksheet 1"
End Sub

HTH,
Bernie
MS Excel MVP


wrote in message
oups.com...
hi,

I am trying to put together a simple macro to do the following job - so
far I haven't succeeded:

copy active cell value,go to the first worksheet in my spreadsheet,
find the pasted value in there and select the row where it has found
the value.

can anyone help?

Thx.

Tom


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
I want to copy the active workbook name to a cell... trumb1mj Excel Discussion (Misc queries) 2 May 30th 06 06:30 PM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
How can user move in locked worksheet but not copy cell contents? PAT Excel Worksheet Functions 0 April 25th 06 08:40 PM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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