Simple If Statement
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 |
Simple If Statement
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 "KWhamill" wrote: 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 |
All times are GMT +1. The time now is 08:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com