Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default A little help vidth a Function

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default A little help vidth a Function

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


"excelent" wrote in message ...
|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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default A little help vidth a Function

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:

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


"excelent" wrote in message ...
|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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Excel - User Defined Function Error: This function takes no argume BruceInCalgary Excel Programming 3 August 23rd 06 08:53 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"