Finding data in a 2e spreadsheat

TOM999999

New Member
Joined
Jan 25, 2005
Messages
5
I wish to enter a date in one spreadsheet, and to find the data thats is ratatch to the same date in a 2e spreadsheet.


how to write the code for searching in a nother spreadsheet.


thanks

tom
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
When you type "Find" in the VB-Editor and then hit F1, you will find an example like the code below. So the syntax to find something in anopther worksheet is:

Worksheets("YourSheet").YourRange.Find(itemtofind, .......)


does this help ?
kind regards,
Erik


Code:
With Worksheets(1).Range("a1:a500")
    Set c = .Find(2, lookin:=xlValues)
    If Not c Is Nothing Then
        firstAddress = c.Address
        Do
            c.Value = 5
            Set c = .FindNext(c)
        Loop While Not c Is Nothing And c.Address <> firstAddress
    End If
End With
 

Forum statistics

Threads
1,147,626
Messages
5,742,215
Members
423,714
Latest member
ftp2jz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top