Sunday, December 2, 2018

Find Cell in a Column

Public Function findUSD()
Dim curr As String
Dim FindRow1 As Range
Dim wb As Workbook

Application.ScreenUpdating = False
Sheets("Sheet1").Visible = True

curr = "USD" 'set variable for String we are looking for

Set wb = ThisWorkbook

wb.Sheets("Sheet1").Select

Set FindRow1 = Range("A:A").Find(What:=curr, LookIn:=xlValues, LookAt:=xlWhole) ' find string in Range

findUSD = FindRow1.Row 'get row number of cell

End Function