VLookup Table_Array Not Playing Well for ServerPath/File Concatentation

mvieira2

New Member
Joined
Dec 11, 2017
Messages
3
Hi all,
I have scoured through countless posts hoping to find a solution, but I have failed. The problem seems to be that concatenate adds "" around the table_array which messes it up.

My goal is to search a specified excel file for the yesterday's date. It will be in the 'E' column in the format of 'YYYY-MM-DD HH:MM:SS'.

From my excel file I have a column of server shares and file names that must be passed to a vba function to get find the specific file name (as they may have the seconds on them).

My example looks like this:
Server Path (Column A)File Name+WildCard (Column B)
\\appdata-eta\ttt\bbb_daily\dcdNCMDFJASD2017-12-11*.xlsx
\\appdata-eta\ttt\bbb_daily\dcd\ArchiveNASDASD2017-12-11*.xlsx

<tbody>
</tbody>

I have to call a macro getfilename(A2,B2) to have it find the specific file name.
I tried to put this in the VLookup and also putting it into a cell I reference later...neither worked

so I have concatenate("'",A2,"[",getfilename(a2,b2),"]","Report 1'!$E:$E") to make my table_array

The rest is VLOOKUP(TEXT(TODAY()-1,"yyyy-mm-dd")&"*",table_array,1,FALSE))



I am losing hair from all the head scratching trying to figure this one out, so hopefully someone can help!!

Thank you in advance!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,214,833
Messages
6,121,867
Members
449,053
Latest member
Mesh

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