Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Nigel
 
Posts: n/a
Default Help on Macro or Formula

Hi,
i hope someone can help me. i need to create a formula that sits in a cell
and looks for data. ( obvioiusly ). however, the formula needs to be in place
even though the file from ehere the data comes from might not be there yet. (
i have to create a book that when a new file is created, the links are
already in place ). i think it could work with an IF type formula for ( if
B2="",""). here is my information.

Cell description:
A2 = Job no.
B2 = Client Name
D2 = Actual Spend on project
Register!D2 = Job Description
Register!H2 = Quoted Amount

my path is S:\Clients\ & Client Name & \ & Job Number & Job Description &
Job Number & " Quotes & Orders.xls
if H2 cell has no value then active cell shows no value.
( this cell will indicate the file created and filled in )

Can a formula be written to take the above details and create a path to a
proposed file?

Thanks in anticipation,

Nigel
  #2   Report Post  
Gary Brown
 
Posts: n/a
Default


Try this formula:-

=IF(B2="","",HYPERLINK("S:\Clients\"&B2&"\"&A2&Reg ister!D2&Sheet1!A2&"Quotes
& Orders.xls"))

One word of warning, not really a good idea to uses "&" in filenames
(Quotes and
Orders.xls would be better) unless I have misunderstood?

The above will only create a link to the file, it won't create the
file.

The link above will be created once the client name is entered, you may
want to adapt it so that the Job No, Client name and Job Description all
in place i.e
IF(OR(A2="",B2="",Register!D2=""),"",HYPERLINK("S: \Clients\"&B2&"\"&A2&Register!D2&Sheet1!A2&"Quotes
& Orders.xls"))

Good Luck

Gary


--
Gary Brown
------------------------------------------------------------------------
Gary Brown's Profile: http://www.excelforum.com/member.php...o&userid=17084
View this thread: http://www.excelforum.com/showthread...hreadid=378487

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

It looks like you want to build that path and filename and use that in the
formula.

I think you'd want to use =indirect() to return your values, but the bad news is
that =indirect() won't work with closed workbooks.

Harlan Grove wrote a UDF called that will retrieve the value from a closed
workbook.

If the reference doesn't exist, it shows an error, but you could use:

=if(iserror(pull(...)),"",pull(...))

You can find Harlan's Pull UDF at:
http://groups.google.co.uk/groups?se...wsranger.co m

But sometimes Google will create errors when copying|pasting. You can find the
same function at Harlan's FTP site:
ftp://members.aol.com/hrlngrv/

You can find his pull.zip there (and shouldn't have any trouble with google!)

Nigel wrote:

Hi,
i hope someone can help me. i need to create a formula that sits in a cell
and looks for data. ( obvioiusly ). however, the formula needs to be in place
even though the file from ehere the data comes from might not be there yet. (
i have to create a book that when a new file is created, the links are
already in place ). i think it could work with an IF type formula for ( if
B2="",""). here is my information.

Cell description:
A2 = Job no.
B2 = Client Name
D2 = Actual Spend on project
Register!D2 = Job Description
Register!H2 = Quoted Amount

my path is S:\Clients\ & Client Name & \ & Job Number & Job Description &
Job Number & " Quotes & Orders.xls
if H2 cell has no value then active cell shows no value.
( this cell will indicate the file created and filled in )

Can a formula be written to take the above details and create a path to a
proposed file?

Thanks in anticipation,

Nigel


--

Dave Peterson
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
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Insert macro into formula Paul Excel Worksheet Functions 1 May 12th 05 08:25 PM
Creating a check mark box MarthaSue Setting up and Configuration of Excel 18 April 28th 05 12:31 AM
Problem with VBA returning the contents of a long formula. [email protected] Excel Discussion (Misc queries) 2 February 23rd 05 12:14 AM
Fill Formula - Macro Cathy U Excel Discussion (Misc queries) 2 February 22nd 05 04:48 PM


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