![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 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 |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
I believe you can not use any function in an array!
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,318
|
Quote:
A constant array cannot have cell refs or computations. Your {1,"Chris";2,now()} includes a computation, that is, NOW(). Aladin |
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
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 |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
whats stopping you from putting these values and formula into a cell range and doing a standard vlookup?
__________________
<table style="background-color:#0e54be" cellspacing="1" cellpadding="2"><td style="background-color:#ceffff;font-family:arial;color:#072c63;font-size:8pt;">***DALEY** :P**</td></table> |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
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 |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
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! |
|
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
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 |
|
|
|
|
|
#9 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,318
|
Quote:
|
|
|
|
|
|
|
#10 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
okie dokie...thanks Aladin...
confirmation that a path is closed is equally as useful as other suggestions much appreciated, as always Chris |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|