From 40ce8a08153a758c09b2d977e46da3737605772b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Jun 2026 17:25:17 +0000 Subject: [PATCH 1/2] Initial plan From c8f854c7c2f7139b3420845076821c84647fc9af Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Jun 2026 17:27:03 +0000 Subject: [PATCH 2/2] findQueryInRow: accept Worksheet type for searchWorksheet parameter --- README.md | 2 +- findQueryInRow.bas | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ec6a7e4..b7b03ac 100644 --- a/README.md +++ b/README.md @@ -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. Sheet1)_ 2. `String` Search Term _(ex. "foo")_ 3. `String` Search Row _(ex. "1:1")_ diff --git a/findQueryInRow.bas b/findQueryInRow.bas index ad868fd..f492a27 100644 --- a/findQueryInRow.bas +++ b/findQueryInRow.bas @@ -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, 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 '''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