How do I link an incrementing file name like reports1or reports2

  • Thread starter Thread starter gonzerv
  • Start date Start date
G

gonzerv

=SUM('C:\F drive\My Documents\Expense reports\[Lkreport47.xls]Mileage Log and
Reimbursement'!J5)

I want to increment the file name to the latest one which is always ending
in a higher numerical.
 
Try

=INDIRECT("'C:\F drive\My Documents\Expense reports\[Lkreport" &
ROW(A46)+1 & ".xls]Mileage Log and Reimbursement'!J5")

If this post helps click Yes
 
NB...

The source file must be open for INDIRECT to work properly.

So, if you copy the formula down 10 cells representing links to 10 different
files then all 10 of those files have to be open.

This is usually not desirable (read: practical).

--
Biff
Microsoft Excel MVP


Jacob Skaria said:
Try

=INDIRECT("'C:\F drive\My Documents\Expense reports\[Lkreport" &
ROW(A46)+1 & ".xls]Mileage Log and Reimbursement'!J5")

If this post helps click Yes
---------------
Jacob Skaria


gonzerv said:
=SUM('C:\F drive\My Documents\Expense reports\[Lkreport47.xls]Mileage Log
and
Reimbursement'!J5)

I want to increment the file name to the latest one which is always
ending
in a higher numerical.
 
P.S.

Also, since the files must be open then you don't need to include the path
in the formula.

--
Biff
Microsoft Excel MVP


T. Valko said:
NB...

The source file must be open for INDIRECT to work properly.

So, if you copy the formula down 10 cells representing links to 10
different files then all 10 of those files have to be open.

This is usually not desirable (read: practical).

--
Biff
Microsoft Excel MVP


Jacob Skaria said:
Try

=INDIRECT("'C:\F drive\My Documents\Expense reports\[Lkreport" &
ROW(A46)+1 & ".xls]Mileage Log and Reimbursement'!J5")

If this post helps click Yes
---------------
Jacob Skaria


gonzerv said:
=SUM('C:\F drive\My Documents\Expense reports\[Lkreport47.xls]Mileage
Log and
Reimbursement'!J5)

I want to increment the file name to the latest one which is always
ending
in a higher numerical.
 
Thanks Biff. I was only looking at incrementing part as the subject prompted
so...

=indirect() function returns an error if the workbook is closed. Check out
the below link for an addin =indirect.ext() which will help.

http://xcell05.free.fr/
http://xcell05.free.fr/morefunc/english/index.htm


If this post helps click Yes
---------------
Jacob Skaria


T. Valko said:
P.S.

Also, since the files must be open then you don't need to include the path
in the formula.

--
Biff
Microsoft Excel MVP


T. Valko said:
NB...

The source file must be open for INDIRECT to work properly.

So, if you copy the formula down 10 cells representing links to 10
different files then all 10 of those files have to be open.

This is usually not desirable (read: practical).

--
Biff
Microsoft Excel MVP


Jacob Skaria said:
Try

=INDIRECT("'C:\F drive\My Documents\Expense reports\[Lkreport" &
ROW(A46)+1 & ".xls]Mileage Log and Reimbursement'!J5")

If this post helps click Yes
---------------
Jacob Skaria


:

=SUM('C:\F drive\My Documents\Expense reports\[Lkreport47.xls]Mileage
Log and
Reimbursement'!J5)

I want to increment the file name to the latest one which is always
ending
in a higher numerical.


.
 
Back
Top