Offshoredude
12-20-2016, 09:41 AM
Gents,
I believe this is quite simple, but..... not to me :-)
How can I make the this code, keep checking for new entries from C10 to ?? and make it stop if it comes to an empty cell in "C"
Sub VlookUp()
Dim ws1 As Worksheet
Set ws1 = Sheets("2_COPY_MAST_LIST")
ws1.Range("O10").Value = WorksheetFunction.VlookUp(ws1.Range("N10").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O11").Value = WorksheetFunction.VlookUp(ws1.Range("N11").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O12").Value = WorksheetFunction.VlookUp(ws1.Range("N12").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O13").Value = WorksheetFunction.VlookUp(ws1.Range("N13").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O14").Value = WorksheetFunction.VlookUp(ws1.Range("N14").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O15").Value = WorksheetFunction.VlookUp(ws1.Range("N15").Value, ws1.Range("AA8:AB39"), 2, 0)
End Sub
I believe this is quite simple, but..... not to me :-)
How can I make the this code, keep checking for new entries from C10 to ?? and make it stop if it comes to an empty cell in "C"
Sub VlookUp()
Dim ws1 As Worksheet
Set ws1 = Sheets("2_COPY_MAST_LIST")
ws1.Range("O10").Value = WorksheetFunction.VlookUp(ws1.Range("N10").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O11").Value = WorksheetFunction.VlookUp(ws1.Range("N11").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O12").Value = WorksheetFunction.VlookUp(ws1.Range("N12").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O13").Value = WorksheetFunction.VlookUp(ws1.Range("N13").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O14").Value = WorksheetFunction.VlookUp(ws1.Range("N14").Value, ws1.Range("AA8:AB39"), 2, 0)
ws1.Range("O15").Value = WorksheetFunction.VlookUp(ws1.Range("N15").Value, ws1.Range("AA8:AB39"), 2, 0)
End Sub