View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JP[_4_] JP[_4_] is offline
external usenet poster
 
Posts: 897
Default Flexible formula for linking to externa Files

So if your lookup value was in D1 and the cell with the two-digit
number was in A1, it would go something like:

=VLOOKUP(D1,"C:\Dept"&A1&" the\rest\of\your\link!Range",2,FALSE)

If you enter 10, this should concatenate to =VLOOKUP(D1,"C:\Dept10 the
\rest\of\your\link!Range",2,FALSE)


--JP

On Feb 2, 1:11*pm, Tami wrote:
hi,
I have a file that has (for simplicity) 5 columns: Dept, Class, Style,
Color, Units Ordered

The Units Ordered column should be a formula to a file named C:\Deptxx, with
the xx being a two-digit dept number (e.g. C:\dept10, C:\dept12, C:\dept15
etc)

so based on the two digits keyed in column 1 (Dept) the Units ordered column
should be a vlookup to file C:\deptxx. *so if someone typed 10 for dept
number the formula is smart enough to look in c:\dept10. *

do i do some concatanation to get this done or is there a better way?
Thanks in advance for any help!
Tami