I am having troubles with the code below. I want it to be linked to a button and findings shown in a list below the selection button.
-------------------------------------------------------------------------------------------------------------------------------------------------
NUMBER
910801
PROJECT NUMBER PLANT PROJECT NAME EQUIPMENT NUMBER OTHER REF # FILE YEAR
-------------------------------------------------------------------------------------------------------------------------------------------------
910801 is in a drop down list and resides in J2. I have a "Find Data" button to the right of the "NUMBER" word. It is linked to the vba coding Sheets.finddata. I want the information when found to be put starting in cell J5.
The error I get is "Object doesn't support this property or method". I'm not sure where to go from here. The vba coding is below:
Sub finddata()
Dim number As String
Dim finalrow As Integer
Dim i As Integer
Sheets("Data").Range("j5:p50").ClearContents
number = Sheets("Data").Range("j2").Value
finalrow = Sheets("Data").Range("A1000").End(x1up).Row
For i = 2 To finalrow
If Cells(i, 1) = number Then
Range(Cells(i, 0), Cells(i, 6)).Copy
Range("j100").End(xlUp).Offset(1, 0).PasteSpecial xlPasteFormulasAndNumberFormats
End If
Next i
Range("j2").Select
End Sub
Thanks....Laurie
Bookmarks