View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VBA formula building

Function FindID(c As Variant, x As Integer)

'c - file (ie. [file1.xls]
'x - arkusz (ie. 4

s = "=INDEX('" & c & x & "'!R8C3:R8C154,1,MATCH(RC3,'" & c & x &
"'!R15C3:R15C154,0))"
FindID = Evaluate(s)
End Function

--
Regards,
Tom Ogilvy


"pm" wrote in message ...
hello,

i try to write a function corresponding to index and match
functions used in excel spreadsheets..

i have sth like this:

Function FindID(c As Variant, x As Integer)

'c - file (ie. [file1.xls]
'x - arkusz (ie. 4

FindID = "=INDEX('" & c & x & "'!R8C3:R8C154,1,MATCH(RC3,'" & c & x &

"'!R15C3:R15C154,0))"

End Function

is it possible to build forumula in such a way?

best