Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Finds queried value in a specified column and returns the row number where the q
1. `common.getColumnLetter`

**Input**:
1. `String` Search Worksheet Name _(ex. "Sheet 1")_
1. `Worksheet` Search Worksheet _(ex. ThisWorkbook.Sheets("Sheet 1"))_
2. `String` Search Term _(ex. "foo")_
3. `String` Search Column _(ex. "A:A")_

Expand All @@ -110,7 +110,7 @@ Finds queried value in a specified row and returns the column number where the q
1. `common.getColumnLetter`

**Input**:
1. `String` Search Worksheet Name _(ex. "Sheet 1")_
1. `Worksheet` Search Worksheet _(ex. ThisWorkbook.Sheets("Sheet 1"))_
2. `String` Search Term _(ex. "foo")_
3. `String` Search Row _(ex. "1:1")_

Expand Down
7 changes: 3 additions & 4 deletions findQueryInColumn.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
'''''''''''''''''''''''''''''''''''''''''''''''
' *** Requires Function "getColumnLetter" ***

'recieves input of worksheet (ex. "Sheet 1"), search term (ex. "foo"), and range (ex. "A:A") as string
'receives input of worksheet (ex. ThisWorkbook.Sheets("Sheet 1")), search term (ex. "foo"), and range (ex. "A:A") as string
'outputs row number as integer

Function findQueryInColumn(searchWroksheet As String, searchTerm As Variant, searchColumn As String) As Integer
Function findQueryInColumn(searchWorksheet As Worksheet, searchTerm As Variant, searchColumn As String) As Integer

'''method 1
'dimension variables
Dim wb As Workbook: Set wb = ThisWorkbook
Dim ws As Worksheet: Set ws = wb.Sheets(searchWroksheet)
Dim ws As Worksheet: Set ws = searchWorksheet
Dim foundRow As Integer

'find the search term within the search range
Expand Down
7 changes: 3 additions & 4 deletions findQueryInRow.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
'''''''''''''''''''''''''''''''''''''''''''''''
' *** Requires Function "getColumnLetter" ***

'recieves input of worksheet (ex. "Sheet 1"), search term (ex. "foo"), and range (ex. "1:1") as string
'receives input of worksheet (ex. ThisWorkbook.Sheets("Sheet 1")), search term (ex. "foo"), and range (ex. "1:1") as string
'outputs column number as integer

Function findQueryInRow(searchWorksheet As String, searchTerm As Variant, searchRow As String) As Integer
Function findQueryInRow(searchWorksheet As Worksheet, searchTerm As Variant, searchRow As String) As Integer

Comment on lines +6 to 10
'''method 1
'dimension variables
Dim wb As Workbook: Set wb = ThisWorkbook
Dim ws As Worksheet: Set ws = wb.Sheets(searchWorksheet)
Dim ws As Worksheet: Set ws = searchWorksheet
Dim foundCol As Integer

'find the search term within the search range
Expand Down