Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use MATCH with a vector in VBA?
Hello
I like to call the worksheetfunction MATCH in VBA. I am using the formula =MATCH(2;1/(2:2<"")) for getting the last used column. How do I programm that with VBA? Application.WorksheetFunction.Match( ... ???? ) Thanks for any hints and examples regards Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use MATCH with a vector in VBA?
I'd use something like:
Option Explicit Sub testme() Dim myFormula As String Dim myRng As Range Dim res As Variant With ActiveSheet Set myRng = .Rows(2) myFormula = "=Match(2,1/(" & _ (myRng.Address(external:=True) & "<""""))") res = Evaluate(myFormula) If IsError(res) Then MsgBox "error" Else MsgBox res End If End With End Sub joes wrote: Hello I like to call the worksheetfunction MATCH in VBA. I am using the formula =MATCH(2;1/(2:2<"")) for getting the last used column. How do I programm that with VBA? Application.WorksheetFunction.Match( ... ???? ) Thanks for any hints and examples regards Mark -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I plot a 3-D vector in Excel? | Charts and Charting in Excel | |||
How do I draw 3D vector arithmetic, showing vector subtraction? | Excel Discussion (Misc queries) | |||
Insert row for each different value in a vector | Excel Programming | |||
from table to vector | Excel Worksheet Functions | |||
Vector lookup function | Excel Worksheet Functions |