View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default Hyperlink varaible substitution - How To

You can probably use INDIRECT() to solve your problem. You have 2 variables
to the values to be added: the month-day portion and the truck number. You
could choose from lists or just type them into cells. Lets say that the
month/day goes into cell $A$1 as text like 10-08 and the truck numbers are
text in $B$1 like 1565

in some other cells you can build up the paths to the cells to be added like
this:
="IFTA\Sledge_IFTA_2008\'[Truck Logs (" & $A$1 & ").xls] & $B$1 & "'!$M$33"
="IFTA\Sledge_IFTA_2008\'[Truck Logs (" & $A$1 & ").xls] & $B$1 & "'!$P$33"

for example's sake we'll say those two formulas are in A2 and A3
Then your SUM() formula can become:
=SUM(INDIRECT($A$2),INDIRECT($A$3))

Hope this helps some.

"Sledge Bacon" wrote:

My dilema is that I have a cumulative 3 month rolling report that takes input
from 3 seperate workbooks that contain 12 worksheets each.

The cumulative report cells have multiple hyperlinks (up to 9) back to the
individual workbooks. eg.

=SUM(IFTA\Sledge_IFTA_2008\[Truck Logs (10-08).xls]1565'!$M$33,
IFTA\Sledge_IFTA_2008\[Truck Logs (10-08).xls]1565'!$P$33)

I need to be able to substitute in both the month (10-08) and also the truck
number (1565). If I can code the month & truck number onto the worksheet say
in $A$30 and $A$31 I can reduce my hardcoding hyperlinks by a massive margin.

I keep seeing examples of VLOOKUP/INDIRECT but can't get the formulas correct.
Am I barking up the wrong tree ???
--
English geezer living in the USA