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

Utility – Get Row Range Interval

Calculates the number of rows in a given row range string formatted as “start:end”.

The function splits the input string by the colon character, converts the parts to integers, and computes the inclusive difference between the start and end values.

VB
    Public Function xlGetRowRangeInterval(RowRange As String) As Integer

        Dim arBound As Integer()

        Try
            arBound = Split(RowRange, ":").ToList.ConvertAll(Function(str) Int32.Parse(str)).ToArray
            Return arBound(UBound(arBound)) - arBound(LBound(arBound)) + 1
        Catch ex As Exception
            Return 0
        End Try

        Return 0
    End Function

Posted by ipercube


© 2026 Ipercube Design