A little help vidth a Function

G

Guest

I made this function and it works fine
xDate is 1 cell vith a date, xRange is a range vith som difrent dates

Function Vagt(xDate, xRange)
Vagt = Application.WorksheetFunction.Match(Range(xDate), Range(xRange))
End Function

The problem is that i have to use "" to make the function work

=Vagt("L3";"A3:A9";0)

Hav do i change my function so i dont have to use ""

=Vagt(L3;A3:A9;0)

thanks in advance
 
N

Niek Otten

Function Vagt(xDate as Range, xRange as Range)
Vagt = Application.WorksheetFunction.Match(xDate, xRange)
End Function

BTW:

=Vagt(L3;A3:A9;0) Should give an error, because the number of arguments is incorrect.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


|I made this function and it works fine
| xDate is 1 cell vith a date, xRange is a range vith som difrent dates
|
| Function Vagt(xDate, xRange)
| Vagt = Application.WorksheetFunction.Match(Range(xDate), Range(xRange))
| End Function
|
| The problem is that i have to use "" to make the function work
|
| =Vagt("L3";"A3:A9";0)
|
| Hav do i change my function so i dont have to use ""
|
| =Vagt(L3;A3:A9;0)
|
| thanks in advance
 
G

Guest

Hi Niek it works great now
y i wrote =Vagt("L3";"A3:A9";0) my mistake

i realy use =Vagt("L3";"A3:A9")

but anyway u made my day :) thanks alot



"Niek Otten" skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top