Freelance Project Requests Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net


Datei 1: Demo_Suche_Position_in_Zellbereich.xlsm



Actually, the function comparison(search text; search area,1).

But the formula always leads to a problem in vba Excel. That's why I simply rewrote the function here with

=get_First_Match(SearchText; search area)


The function, the code is below for copying or as a download in the appendix file


Option Explicit On


Public Function get_First_Match(ByVal SearchString, ByVal rangeToSearch) As Integer

    '--------< get_First_Match() >------------

    '*Sucher das erste Vorkommen in einem Range Spalte Zeile und gib die Position zurueck

    Dim iMatch As Integer

    iMatch = -1

    Dim iCell As Integer

    iCell = 0

    Dim cell As Range

    For Each cell In rangeToSearch.Cells

        iCell = iCell + 1

        If cell.Value Like SearchString Then

            iMatch = iCell - 1

            Exit For

        End If


    get_First_Match = iMatch

    '--------</ get_First_Match() >------------

End Function




Und in vba Editor

Excel : Convert numbers to text
Excel function: find the position in a column or row
Excel: Find text in a value
Excel: Count how often a value occurs
Excel Exponent Numbers
Excel: Text Like function
Excel: Determine a substring from text with Formulas
Excel: Barcode by Excel Insert macro code into cells
Excel Macro Formulas for calculation
Excel: Enter values ​​from your own function formula


Contact for Jobs, Project Requests: