Results 1 to 18 of 18

Thread: Get row number from a closed workbook

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    Sub test3()
        Dim s As String
        Dim f As String
        Dim n
        s = "PRO123456"
        f = "=Iferror(match(""" & s & """,'Q:\KUNDER\PROJEKTER\HPG\[HPG_DB.xlsx]Template_0'!$A:$A,0),""not found"")"
        With Cells(Columns.Count)
            .Formula = f
            n = .Value
            .Clear
        End With    
        MsgBox "row number : " & n    
    End Sub
    Last edited by Aussiebear; 02-08-2025 at 09:03 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •