gunny2k9
04-23-2012, 01:27 AM
Morning all,
is it me being dumb or just not enough coffee yet...
Ok so being 8am this morning got asked to try clean up a report, thought ye no problem be easy, work that vba magic on it. :devil2:
So i wrote a quick test code
Sub proDelete()
Range("B1").Select
Do Until Selection.Value = ""
If Selection.Value = "UNEEDED" Then
'Selection.EntireRow.Delete
MsgBox "Delete ME"
Else
Selection.Offset(1, 0).Select
MsgBox "Keep ME"
End If
Loop
Range("A1").Select
End Sub
but this wasnt working.. to find out the the data in Column J is all in fact VLOOKUPs :doh:
=VLOOKUP(F2,'Data'!A:B,2,FALSE)
now i ve bever had to deal with VBA and VLOOKUPs together :dunno so, just wondering if thers an quick easy way to read the VLOOKUPS Value its returned like "UNEEDED" :help
THANKS IN ADVANCE
is it me being dumb or just not enough coffee yet...
Ok so being 8am this morning got asked to try clean up a report, thought ye no problem be easy, work that vba magic on it. :devil2:
So i wrote a quick test code
Sub proDelete()
Range("B1").Select
Do Until Selection.Value = ""
If Selection.Value = "UNEEDED" Then
'Selection.EntireRow.Delete
MsgBox "Delete ME"
Else
Selection.Offset(1, 0).Select
MsgBox "Keep ME"
End If
Loop
Range("A1").Select
End Sub
but this wasnt working.. to find out the the data in Column J is all in fact VLOOKUPs :doh:
=VLOOKUP(F2,'Data'!A:B,2,FALSE)
now i ve bever had to deal with VBA and VLOOKUPs together :dunno so, just wondering if thers an quick easy way to read the VLOOKUPS Value its returned like "UNEEDED" :help
THANKS IN ADVANCE