Simple If Statement

  • Thread starter Thread starter KWhamill
  • Start date Start date
K

KWhamill

I want to include an if Statement. That will look for the word Payside in the
column header and if it can find it then continue with the Sub or if it can't
just skip the sub. I'm not sure what i'm doing wrong.
Thanks,
Karl
 
Never mind answered my own question:

' PaySide
With Worksheets("Entries").Rows("1:3")
Set PaySide = .Find(what:="PaySide", LookIn:=xlValues)
If PaySide Is Nothing Then
GoTo TradeID
Selection.Find(what:="PaySide", After:=ActiveCell,
LookIn:=xlFormulas _
, lookat:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(1, 0).Select
Range(Selection, Selection.End(xlDown)).Copy
Application.Goto Reference:=Worksheets("uploader").Rows("1:1")
Selection.Find(what:="PaySide", After:=ActiveCell,
LookIn:=xlFormulas, _
lookat:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(1, 0).PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top