LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default SET UP FORMULAS AND CODE TO WORK WHEREVER WKB IS USED

Hi

In a cell, I've got this formula

=UPPER(IF(ISNA(MATCH($E$3,'R:\Benefits\...\[BenDatabase.xls]Sheet1'!$A
$1:$A$65536,0)),"",INDEX('R:\Benefits\...\[BenDatabase.xls]Sheet1'!$B
$1:$B$65536,MATCH($E$3,'R:\Benefits\...\[BenDatabase.xls]Sheet1'!$A
$1:$A$65536,1),0)))

and in VBA, I've got this code

Workbooks.Open Filename:= "R:\Benefits\...\BenDatabase.xls"

This is ok when I'm in the office, but when I'm at home, I want this
formula

=UPPER(IF(ISNA(MATCH($E$3,C:\Documents and Settings\...\
[BenDatabase.xls]Sheet1'!$A$1:$A$65536,0)),"",INDEX('C:\Documents and
Settings\...\[BenDatabase.xls]Sheet1'!$B$1:$B$65536,MATCH($E$3,'C:
\Documents and Settings\...\[BenDatabase.xls]Sheet1'!$A$1:$A$65536,1),
0)))

and this code

Workbooks.Open Filename:= "C:\Documents and Settings\...
\BenDatabase.xls"

ie, the workbook BenDatabase.xls is in a different place, depending on
where I'm working. How can I set up the formula and the code to work
wherever I am?

Cheers
Rob
 
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
No formulas Work BG Mark Excel Discussion (Misc queries) 3 June 6th 10 12:58 PM
Verify Canadian Postal Code ~ make the code work jat Excel Programming 2 February 27th 09 09:12 PM
formulas do not work Crystal Excel Discussion (Misc queries) 2 May 8th 08 06:51 PM
formulas don,t work Kiss New Users to Excel 4 August 10th 05 03:26 AM
How can I work around the non value (#N/A) when using formulas in. Fleur Excel Worksheet Functions 3 February 3rd 05 01:15 PM


All times are GMT +1. The time now is 05:01 AM.

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"