Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default build external ref in formula from text?

I am building a template in an Excel worksheet. Users will use this template
to create one new record for every employee we have. There is a drop-down
list in the template where users can select which employee to build the
record for.

Once users have made the selection, a lookup formula finds that employee's
ID# in another cell.

Then, four of the cells in the template have to be updated by referencing an
old worksheet for that particular employee. The old worksheets are in a
separate folder. They are each named in this format: employee ID#Date.xls,
where the date is constant for all. (For example, A103B806.xls, where
"A103B" is the employee ID# and "806" is the date reference.)

I want to find a way to avoid making each user create links to the old file
for each individual. I can string together the ID # and date to re-create
the file name, and can also string together the rest of the link to the
folder where the other files are stored (using the CONCATENATE function).

How can I make the resulting text, which looks exactly like a formula but is
in text format, into a formula that automatically calculates (no need for
each user to do anything to make it calculate)?

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default build external ref in formula from text?

You would create a macro. Declare a constant to hold the name of the
directory/folder htat contains the old file, and a variable to hold the name
of the file you are looking for, read the emp ID into this variable, and
concatenate with the date ref. Say your emp ID is in B4, then something like
vFName = Range("B4") & "806". Say your lookup range is in the other file,
from A2:G250, A being the emp ID and C being the info you are looking for.

Where you want the VLOOKUP formula, enter your formula with
Range("D4").formula = "=VLOOKUP(B4,cDir &"\" & vFName & "!A2:G250,3,FALSE)"

Do the sqame for the other 3 columns, obviously chaging the offsets.
--
Hth

Kassie Kasselman


"klp2344" wrote:

I am building a template in an Excel worksheet. Users will use this template
to create one new record for every employee we have. There is a drop-down
list in the template where users can select which employee to build the
record for.

Once users have made the selection, a lookup formula finds that employee's
ID# in another cell.

Then, four of the cells in the template have to be updated by referencing an
old worksheet for that particular employee. The old worksheets are in a
separate folder. They are each named in this format: employee ID#Date.xls,
where the date is constant for all. (For example, A103B806.xls, where
"A103B" is the employee ID# and "806" is the date reference.)

I want to find a way to avoid making each user create links to the old file
for each individual. I can string together the ID # and date to re-create
the file name, and can also string together the rest of the link to the
folder where the other files are stored (using the CONCATENATE function).

How can I make the resulting text, which looks exactly like a formula but is
in text format, into a formula that automatically calculates (no need for
each user to do anything to make it calculate)?

Thank you.

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
Converting text string back into a formula Kevin c Excel Discussion (Misc queries) 1 October 17th 06 09:52 PM
Conditional formatting based on text within a formula Sarah Jane Excel Worksheet Functions 13 October 12th 06 04:12 PM
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Invisable text in formula bar Leroy-P Excel Discussion (Misc queries) 2 December 8th 05 02:40 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM


All times are GMT +1. The time now is 12:10 PM.

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

About Us

"It's about Microsoft Excel"