Trying to simplify a lookup

wageslave101

Board Regular
Joined
Jul 18, 2007
Messages
154
I'm trying to reduce the amount of manual re-entry to a spreadsheet which contains many lookups in the format;

Code:
=IF(VLOOKUP(TODAY(), '[FirstName LastName.xls]Entry'!A1:A501, 1, TRUE)<TODAY(), "0", '[FirstName LastName.xls]Entry'!$L$32)

Is there an way that I can get form the string used for the .xls from a cell reference.

For example if the FirstName is in cell B1 and the LastName is in C1 can I join the two together to use in the lookup rather than the name manually entered in?

Cheers,
WageSlave
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi Ravi,

Thanks for the reply. I had tried donig that, however the problem I encountered was when I tried to use it in the lookup.

The lookup is checking for todays date in the Entry Sheet of the persons workbook.

Assuming that I use D1 to concentate B1 and C1 to make the name component of the sheet or even

Code:
D1 = C1 & " " & D1 & ".xls"

When I try to use it in the lookup

Code:
=IF(VLOOKUP(TODAY(), D1!A1:A501, 1, TRUE)<TODAY(), "0", 'D1Entry'!$L$32)

I had tried creating the entire string in the D1 cell including the range, but this also generates an error.

Still pondering,
WageSlave
 
Upvote 0
HI
your syntax is not right. if D1 is a file name you should have
"[" & D1 & "]" & entry!A1:A501
Ravi
 
Upvote 0
Hi Ravi,

Thanks for the reply. I had tried donig that, however the problem I encountered was when I tried to use it in the lookup.

The lookup is checking for todays date in the Entry Sheet of the persons workbook.

Assuming that I use D1 to concentate B1 and C1 to make the name component of the sheet or even

Code:
D1 = C1 & " " & D1 & ".xls"

When I try to use it in the lookup

Code:
=IF(VLOOKUP(TODAY(), D1!A1:A501, 1, TRUE)<TODAY(), "0", 'D1Entry'!$L$32)

I had tried creating the entire string in the D1 cell including the range, but this also generates an error.

Still pondering,
WageSlave

One of:

=IF(LOOKUP(TODAY(),INDIRECT("'["&B1&" "&C1&".xls]Entry'!A1:A501"))<TODAY(),0,INDIRECT("'["&B1&" "&C1&".xls]Entry'!L32"))

=IF(VLOOKUP(TODAY(),INDIRECT("'["&B1&" "&C1&".xls]Entry'!A1:A501"),1,1)<TODAY(),0,INDIRECT("'["&B1&" "&C1&".xls]Entry'!L32"))

INDIRECT requires that the target workbook file is open. If you want to work with closed books, substitute INDIRECT.EXT for INDIRECT, which is available from the free morefunc.xll add-in.
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,649
Members
448,975
Latest member
sweeberry

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