Skip to sidebar Skip to content
Ipercube Technical
Jack of all trades, master of none
Date: Time: - Stardate:
Welcome, Log in by clicking  Here!
SS64
MDN
Stack
Code
GitHub
Wiki
Convert
V Studio
  • Home
  • VB Functions
    • Access Functions
    • Assembly Info
    • Color/Image Functions
    • Data Table Functions
    • Email Functions
    • Active Directory Functions
    • LDAP Functions
    • Excel Functions
    • Logging Functions
    • Source Code Retrieval
    • String Functions
    • Sql Functions
    • Object Utilities Functions
    • System and Utilities
    • Utility Forms
  • VB Classes
    • Environment Variables Helper
  • ABAP
    • ABAP Reports
    • ABAP HTTP Functions
Ipercube Technical
  • Home
  • VB Functions
    • Access Functions
    • Assembly Info
    • Color/Image Functions
    • Data Table Functions
    • Email Functions
    • Active Directory Functions
    • LDAP Functions
    • Excel Functions
    • Logging Functions
    • Source Code Retrieval
    • String Functions
    • Sql Functions
    • Object Utilities Functions
    • System and Utilities
    • Utility Forms
  • VB Classes
    • Environment Variables Helper
  • ABAP
    • ABAP Reports
    • ABAP HTTP Functions

Worksheet Search – Get Element Start Row

Searches for a specific text value in a given column of an Excel.Worksheet and returns the row number where it is found.

Uses the Find method on the specified column to locate the first occurrence of the text.

VB
    Public Function xlGetElementStartRow(TextToSearch As String, 
                                         ColumnToSearch As Integer, 
                                         wsSheet As Excel.Worksheet) As Integer

        'Search start row in Project DB
        Dim erIDs As Excel.Range = wsSheet.Columns(ColumnToSearch)
        Try
            Return erIDs.Find(TextToSearch).Row
        Catch ex As Exception
            Return 0
        End Try

    End Function

Posted by ipercube


© 2026 Ipercube Design