Home finding values in a different column of a different sheet then pasting it to the orignial sheet
Reply: 0

finding values in a different column of a different sheet then pasting it to the orignial sheet

user818
1#
user818 Published in May 20, 2018, 11:57 am

I have a value in cell b3 of sheet Lookup, I want to find if that value in sheet Data, range B2:B11302, when that value is found, I want to jump over to one cell to the right, copy that value then paste it in cell b8 in sheet Lookup again. I am using the following code but I keep getting run-time error 1004. Please help!

Sub lookupval1()



Dim j As Long
Dim clid As String
Dim n As Integer
Dim k As Long
Dim m As Long
Dim pol_num As Range



clid = Sheets("Lookup").Range("c3")



j = 1
k = 1
m = 1

Do Until Sheets("Data").Range("b2").Offset(j - 1, 0) = ""


    If clid = Sheets("Data").Range("b2").Offset(j - 1, 0) Then
        Sheets("Lookup").Range("b8").Value = Sheets("Data").Range("b2").Offset(j - 1, 0).Select
    Else

    End If

    j = j + 1

Loop



End Sub
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.299367 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO