Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there
Can anybody explain why I have this particular problem? I have written a UDF that outputs a 2-dimensional array. If this UDF is called F(x) why does the following give a #N/A error? MATCH(X6,F(x)) If I can't find a way to make this work then I guess I'll have to write a UDF of my own to solve the problem. Cheers. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A UDF cannot change anything in a workbook.
If that is not an answer to your question; what is the code of your UDF and what are the values of the cells involved? -- Kind regards, Niek Otten Microsoft MVP - Excel "pinkfloydfan" wrote in message oups.com... | Hi there | | Can anybody explain why I have this particular problem? | | I have written a UDF that outputs a 2-dimensional array. If this UDF is | called F(x) why does the following give a #N/A error? | | MATCH(X6,F(x)) | | If I can't find a way to make this work then I guess I'll have to write | a UDF of my own to solve the problem. | | Cheers. | |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Niek
The UDF is not changing anything on the workbook. The code is too complex but suffice to say that on its own it works fine...it outputs a 2-column set of results where the first column is a list of dates and the second is a list of numbers associated with each date. I don't want to have to perform the MATCH (or a VLOOKUP) on the output as that would be unwieldy...it would be much neater if I could use the UDF as an indirect reference to an array within MATCH. Does that make sense? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
pinkfloydfan wrote:
Hi Niek The UDF is not changing anything on the workbook. The code is too complex but suffice to say that on its own it works fine...it outputs a 2-column set of results where the first column is a list of dates and the second is a list of numbers associated with each date. I don't want to have to perform the MATCH (or a VLOOKUP) on the output as that would be unwieldy...it would be much neater if I could use the UDF as an indirect reference to an array within MATCH. Does that make sense? Thanks What is X6? Alan Beban |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Any cell reference you want...
|
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When you say your function returns a 2D array do you mean multi row in two
columns. If so the Match function needs a single row or column. If you want to match say the second column of the array returned by the UDF try =MATCH(X6,index(F(x),,2) I assume X6 is a cell ref & x is a value being the UDF arg' Regards, Peter T "pinkfloydfan" wrote in message oups.com... Hi there Can anybody explain why I have this particular problem? I have written a UDF that outputs a 2-dimensional array. If this UDF is called F(x) why does the following give a #N/A error? MATCH(X6,F(x)) If I can't find a way to make this work then I guess I'll have to write a UDF of my own to solve the problem. Cheers. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perfect!
Thanks a lot Peter |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I omitted the closing bracket (in my previous post)
=MATCH(X6,index(F(x),,2) =MATCH(X6,index(F(x),,2)) Glad you got it working Regards, Peter T "pinkfloydfan" wrote in message ups.com... Perfect! Thanks a lot Peter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Match using array of column and row references to match with | Excel Worksheet Functions | |||
Having trouble getting MATCH to work with a variable lookup array | Excel Worksheet Functions | |||
Can't get array formula to work in MATCH function | Excel Worksheet Functions | |||
index match array function-returning only first match, need last. | Excel Worksheet Functions | |||
Error Generated from Array formula | Excel Programming |