Vlookup with Variable Dates AGAIN

Smeggy

Board Regular
Joined
Mar 7, 2013
Messages
151
Hi All,
From a previous post and reply i'm trying to use a vlookup with variable dates, i'm struggling again, additionally
with this one though the sheet i'm searching in need column C to be converted to numbers and i would prefer not to have to
do that if possible.

Is there any way to complete the search without a convert to number first?
Then why doesn't the second formula work that i'm trying.

This is not being entered into the cell via VB just simply pasted.


Any ideas?


=VLOOKUP(A5,'[MDS 2014-09-16.xlsb]MDS'!$C:$T,18,FALSE)
=VLOOKUP(A5,'[MDS" & format(now, "yyyy-mm-dd") & ".xlsb]MDS'!$C:$T,18,FALSE)
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
What's in A5 on the sheet containing the formula and column C on sheet MDS?

For the second formula you need INDIRECT:

=VLOOKUP(A5,INDIRECT("'[MDS"&TEXT(NOW(),"yyyy-mm-dd")&".xlsb]MDS'!$C:$T"),18,FALSE)
 
Upvote 0
Hi Andrew,
Apologies, there is nothing wrong with the first formula apart from it being absolute, i.e. the date is not variable and
would need to be re-written every time the my sheet is created. I needed to create a formula that would look at today's MDS.
Essentially this is a file that is re-produced and sent out on a daily basis.
The problem lies not with the sheet where teh vlokup is being placed but rather the MDS. The columns that im using to do the
Vlookup is in my file numbers and in the MDS requires converting to numbers.
if i try to break it down:

A5 - is fine and is a number
MDS(Book) is a constant
Date (now, " yyyy-mm-dd") is variable
MDS(Sheet) is constant
C = a number requiring converting to number

I hope that makes a little more sense.

Regards
 
Upvote 0
Andrew,
For whatever reason it wouldn't read column C, it produced an #N/A, i added ""& which seems to work, the
formula now looks like:
=VLOOKUP(""&A6,INDIRECT("'[MDS"&TEXT(NOW()," yyyy-mm-dd")&".xlsb]MDS'!$C:$T"),18,FALSE)
 
Upvote 0
That's because you were trying to look up a number in a column of text. What you added coerces the number to text.
 
Upvote 0

Forum statistics

Threads
1,225,489
Messages
6,185,283
Members
453,285
Latest member
Wullay

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