Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vane0326
 
Posts: n/a
Default Vlookup file location changes depending on value within cell


Hope this helps.

1.) Enter date in cell G12

( 052406 )

2.) Enter your formula in cell K12 without the equal sign, I substitute
your file name with "date"

VLOOKUP(N17,'C:\Documents and
Settings\mstege\Desktop\PaymentechTemp\[date.xls]date'!$A$2:$Z$29,26,FALSE)

3.) Enter this formula in cell M12

="="&(SUBSTITUTE(K12,"date",$G12))


4.) Copy this code and right click on your worksheet tab and paste it
onto the white area and close it.


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("G12")) Is Nothing Or Target.Cells.Count 1 Then Exit Sub
If Target.Cells.Count 1 Then Exit Sub

Range("I12").Value = Range("M12").Value

End Sub
--------------------



Now change the date in cell G12 you wil get your result. It will place
your formula in cell I12.


--
vane0326
------------------------------------------------------------------------
vane0326's Profile: http://www.excelforum.com/member.php...o&userid=14731
View this thread: http://www.excelforum.com/showthread...hreadid=545993

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving worksheet in new file with date AND cell value as file name michaelberrier Excel Discussion (Misc queries) 4 May 26th 06 08:05 PM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
creating a file name from a cell Lee Stiles Excel Discussion (Misc queries) 2 February 23rd 06 11:28 PM
Using Jet to read excel file returns blank for last cell - sometim Ron Excel Discussion (Misc queries) 1 December 9th 04 08:21 AM


All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"