PC Review


Reply
Thread Tools Rate Thread

copy active cell value,find the pasted value in different worksheet

 
 
tomaz.vouk@gmail.com
Guest
Posts: n/a
 
      7th Jul 2006
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 With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      7th Jul 2006
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


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 With Quote
 
tomaz.vouk@gmail.com
Guest
Posts: n/a
 
      9th Jul 2006
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
>
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Value of Active cell and 25 rows above to a diff worksheet ash3154 Microsoft Excel Misc 4 2nd Sep 2009 12:56 AM
Copy/Paste repeats the pasted cells across worksheet Pantherus Microsoft Excel Crashes 0 16th Nov 2008 11:11 PM
Copy cell value to new worksheet, based on find results dan Microsoft Excel Programming 2 19th Jun 2006 09:41 PM
Place The Contents Of A Cell From The Active Worksheet Into A Cell On An Inavtive Worksheet Minitman Microsoft Excel Programming 1 25th Feb 2004 04:26 AM
Place The Contents Of A Cell From The Active Worksheet Into A Cell On An Inavtive Worksheet Minitman Microsoft Excel Misc 1 25th Feb 2004 04:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:06 AM.