#1   Report Post  
Posted to microsoft.public.excel.misc
Arien
 
Posts: n/a
Default formula wont update


Hi,

Somebody (forgot the name, sorry) on this forum gave me a formula to
check if a filename exists:

Function BookExists(wb As String)
BookExists = Len(Dir(wb)) 0
End Function

It worked fine however now I am using it in a different sheet were the
filename is flexible like:

=IF(BookExists(path&filename&"*.xls");TRUE;FALSE)

were path is a named field and filename is a reference to a cell (like
A20)

It still works but only recalculates (checks if the file exists) when I
edit the cell and press enter again. Just F9 won't work.

Is there a way to make this formula recalculate by itself or
recalculate by a macro?

Thanks for your help.

Arien de Haan


--
Arien
------------------------------------------------------------------------
Arien's Profile: http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=514849

  #2   Report Post  
Posted to microsoft.public.excel.misc
Arien
 
Posts: n/a
Default formula wont update


That somebody must have been Bob Phillips...


--
Arien
------------------------------------------------------------------------
Arien's Profile: http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=514849

  #3   Report Post  
Posted to microsoft.public.excel.misc
Kevin B
 
Posts: n/a
Default formula wont update

Add the following line to the custom formula:

application.Volatile

This will force the formula to recalc everytime the spreadsheet recalcs.

Kevin Backmann


"Arien" wrote:


Hi,

Somebody (forgot the name, sorry) on this forum gave me a formula to
check if a filename exists:

Function BookExists(wb As String)
BookExists = Len(Dir(wb)) 0
End Function

It worked fine however now I am using it in a different sheet were the
filename is flexible like:

=IF(BookExists(path&filename&"*.xls");TRUE;FALSE)

were path is a named field and filename is a reference to a cell (like
A20)

It still works but only recalculates (checks if the file exists) when I
edit the cell and press enter again. Just F9 won't work.

Is there a way to make this formula recalculate by itself or
recalculate by a macro?

Thanks for your help.

Arien de Haan


--
Arien
------------------------------------------------------------------------
Arien's Profile: http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=514849


  #4   Report Post  
Posted to microsoft.public.excel.misc
Arien
 
Posts: n/a
Default formula wont update


Kevin,

Thanks for your help, but I am afraid it still does not update.

I now made the formula:

Function BookExists(wb As String)
Application.Volatile
BookExists = Len(Dir(wb)) 0
End Function

Did I understand you correctly?

I still have to edit the cell with the formule (F2) and press enter.

regards,
Arien


--
Arien
------------------------------------------------------------------------
Arien's Profile: http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=514849

  #5   Report Post  
Posted to microsoft.public.excel.misc
Arien
 
Posts: n/a
Default formula wont update


Sorry my mistake. It does work now.

Thanks a lot

regards,
Arien


--
Arien
------------------------------------------------------------------------
Arien's Profile: http://www.excelforum.com/member.php...fo&userid=1892
View this thread: http://www.excelforum.com/showthread...hreadid=514849

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
update data in workbooks through formula umba-sr Excel Discussion (Misc queries) 2 March 3rd 06 03:11 AM
How to turn off auto update on a formula Dave Excel Discussion (Misc queries) 0 February 20th 06 09:15 PM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Update to : Pulling my hair out, need some help building formula Jackanorry Excel Worksheet Functions 5 June 29th 05 05:10 PM
How can a formula in a cell automatically update when inserting a. stbookkeeper Excel Worksheet Functions 1 June 23rd 05 08:14 PM


All times are GMT +1. The time now is 05:02 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"