VLOOKUP error

Chris Davison

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,790
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
:)
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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
/board/images/smiles/icon_smile.gif

Chris,

A constant array cannot have cell refs or computations. Your

{1,"Chris";2,now()}

includes a computation, that is, NOW().

Aladin
 
Upvote 0
hummph

thanks Guys

Aladin, you said "constant" array

are there other types I could use that would allow such a function as now() ?

ta
Chris
 
Upvote 0
whats stopping you from putting these values and formula into a cell range and doing a standard vlookup?
 
Upvote 0
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!
 
Upvote 0
thanks Yogi mate

if you're familiar with the above link, you'll be aware of the constraints.... no outside cell references......single cell formula only

sorry, I didn't want to drag up this old chestnut per se, I was just tinkering around with arrays
 
Upvote 0
On 2002-04-13 16:41, Chris Davison wrote:
hummph

thanks Guys

Aladin, you said "constant" array

are there other types I could use that would allow such a function as now() ?

ta
Chris

No. One needs constructor functions that would allow computing the array first then evaluate the formula of which the computed array is/becomes a part.
 
Upvote 0
okie dokie...thanks Aladin...

confirmation that a path is closed is equally as useful as other suggestions

much appreciated, as always
Chris
:)
 
Upvote 0

Forum statistics

Threads
1,214,566
Messages
6,120,266
Members
448,953
Latest member
Dutchie_1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top