Find Data From Sheet2

Dazzawm

Well-known Member
Joined
Jan 24, 2011
Messages
3,786
Office Version
  1. 365
Platform
  1. Windows
I have a list of numbers on sheet 1 in column A. What I need to do is look for those numbers on sheet 2 and put what is in the adjacent cell on sheet 2 into column B on sheet 1. Thanks.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
you will need something like:

in B1 put

=VLOOKUP(A1,'Sheet 2'!A1:B500,1,FALSE)

and drag it down

asuming the numbers in sheet 2 are in colum A and the data is in column B
 
Upvote 0
in that case you should be able to adapt this code to look for it
im in work at the mo and dont have time sorry,

Code:
Sub F_Search()
Dim ws As Worksheet, Found As Range, rngNm As String
Dim myText As String, FirstAddress As String, thisLoc As String
Dim AddressStr As String, foundNum As Integer
PartNumber = InputBox("Enter Delivery Number", "Del Note Number", "")
If PartNumber = "" Then Exit Sub
For Each ws In ActiveWorkbook.Worksheets
With ws
Set Found = .UsedRange.Find(what:=PartNumber, LookIn:=xlFormulas, MatchCase:=False)
If Not Found Is Nothing Then
FirstAddress = Found.Address
Do
foundNum = foundNum + 1
rngNm = .name
AddressStr = AddressStr & .name & " " & Found.Address & vbCrLf
thisLoc = rngNm & " " & Found.Address
Sheets(rngNm).Select
Range(Found.Address(RowAbsolute:=False, _
ColumnAbsolute:=False)).Select
Set Found = .UsedRange.FindNext(Found)
Loop While Not Found Is Nothing And Found.Address <> FirstAddress
End If
End With
Next ws
If Len(AddressStr) Then
Else:
MsgBox "Unable to find " & PartNumber & " in this workbook.", vbExclamation
End If
Exit Sub
End Sub
 
Upvote 0
in that case you should be able to adapt this code to look for it
im in work at the mo and dont have time sorry,

Thanks but I don't know enough about VBA to adapt codes. I will need a code done for me by someone if poss. Thanks.
 
Upvote 0
I thought formulas/functions would only be useful if they all came from the same column. As I said I dont know where they will be on sheet 2 among the possible 100,000+ cells.
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,912
Members
452,949
Latest member
beartooth91

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
Back
Top