Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88854

How to use "WorksheetFunction.Match" as array with variable range

$
0
0

I am trying to implement a .Match function as an array with a variable range in VBA, to find the first non-zero cell in a specific range.

However, currently I only receive a runtime error 1004.

Set myRange = Worksheets("Portf_Mod").Range("AB368:CY368") 
With Application.WorksheetFunction
    Date_col = .Match(True, [myRange <> 0], 0)
End With

Viewing all articles
Browse latest Browse all 88854


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>