Thanks:  0
Likes:  0

# Thread: VLOOKUP error

1. On 2002-04-13 16:48, Yogi Anand wrote:
On 2002-04-13 16:35, Chris Davison wrote:
Mornign All,

I'm getting an error on the following :

=VLOOKUP(2,{1,"Chris";2,now()},2,0)

am I right in thinking I'm not allowed to use ANY volatile functions in arrays ?

thanks
Chris
Hi Chris:
As I mentioned in my post above I believe you can not use any FUNCTION, or even a CELL REFERENCE in an array. One can however, like in your instance use the INDIRECT FUNCTION ...

=INDIRECT(VLOOKUP(2,{1,"Chris";2,"E19"},2,0))

where E19 houses =NOW()

and I did get the result as 4/13/02 7:43 PM

Keep up the good work buddy!
Yogi,

This is quite wrong.
Change the lookup-value from 2 to 1. You'll see.

Regards,

2. On 2002-04-13 16:47, Chris Davison wrote:
Daleyman.... wow we're all up late !!

I'm still farting around with an earlier thread about lottery numbers generated from a single formula

if you're curious : http://www.mrexcel.com/board/viewtop...c=3658&forum=2 but it's a bit boring now LOL
I have that thing still in my mind. If it is acceptable to return once in a while, I got something for you.

3. *chuckle*

me too

private or board ?

4. Hi Chris:
As I mentioned in my post above I believe you can not use any FUNCTION, or even a CELL REFERENCE in an array. One can however, like in your instance use the INDIRECT FUNCTION ...

=INDIRECT(VLOOKUP(2,{1,"Chris";2,"E19"},2,0))

where E19 houses =NOW()

and I did get the result as 4/13/02 7:43 PM

Keep up the good work buddy!
Yogi,

This is quite wrong.
Change the lookup-value from 2 to 1. You'll see.

Regards,

Thanks for your message! ... I did put the lookup value as 1, and as you did mention instead of getting Chris, I got #REF
I did want to acknoqledge that first before I went looking into what is really happening -- what do you figure, 1) why did I get the right result for Lookup value of 2, and not with 1?

Regards!

5. On 2002-04-13 17:56, Yogi Anand wrote:

Hi Chris:
As I mentioned in my post above I believe you can not use any FUNCTION, or even a CELL REFERENCE in an array. One can however, like in your instance use the INDIRECT FUNCTION ...

=INDIRECT(VLOOKUP(2,{1,"Chris";2,"E19"},2,0))

where E19 houses =NOW()

and I did get the result as 4/13/02 7:43 PM

Keep up the good work buddy!
Yogi,

This is quite wrong.
Change the lookup-value from 2 to 1. You'll see.

Regards,

Thanks for your message! ... I did put the lookup value as 1, and as you did mention instead of getting Chris, I got #REF
I did want to acknoqledge that first before I went looking into what is really happening -- what do you figure, 1) why did I get the right result for Lookup value of 2, and not with 1?

Regards!
Yogi,

VLOOKUP fetches the constant E19 and hands it over to INDIRECT which deferences that constant. But other values in the constant array cannot be deferenced because they do not refer to anything but to themselves.

Regards,

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•