Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need Help writing a macro

Root Year Quarter Filename Type


='c:\Documents\ 2004\ Quarter 3\ [Test .xls]
Data Range
Performance'!$A$2:$J$402


Formula
='c:\Documents\2004\Quarter 3
[Test.xls]Performance'!$A$2:$J$402

I would like to define Name "CompanyA" (i.e, insert name, company A) t
be linked to formula above. The only problem is that I want the link t
be dynamic so when I change the top of the input sheet (highlighted i
yellow) the formula changes which then changes the link that is bein
used to define company A. Any help writing this macro? Thank you al
in advance.

I have made an example excel file but I do not know how to post on th
forum. Please let me know if you want to see the file and I willl sen
it to you via email. Thank you all very very much

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Need Help writing a macro

I presume that you want to change [Test.xls} to another
name defined in a cell at the top of the page.

If this is the case then create a variable to contain the
name as defined in the relevant cell.
then use the variable in the path defintiion.

eg

compname=activesheet.range("A1").value

="c:\Documents\2004\Quarter 3\"& compname & "Performance!
$A$2:$J$402"

Hope this is what ytou are looking for.

BOL
DavidC
-----Original Message-----
Root Year Quarter

Filename Type


='c:\Documents\ 2004\ Quarter 3\ [Test

.xls]
Data Range
Performance'!$A$2:$J$402


Formula
='c:\Documents\2004\Quarter 3\
[Test.xls]Performance'!$A$2:$J$402



I would like to define Name "CompanyA" (i.e, insert name,

company A) to
be linked to formula above. The only problem is that I

want the link to
be dynamic so when I change the top of the input sheet

(highlighted in
yellow) the formula changes which then changes the link

that is being
used to define company A. Any help writing this macro?

Thank you all
in advance.

I have made an example excel file but I do not know how

to post on the
forum. Please let me know if you want to see the file

and I willl send
it to you via email. Thank you all very very much.


---
Message posted from http://www.ExcelForum.com/

.

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
macro writing dannyboy8 Excel Worksheet Functions 1 April 22nd 09 02:51 AM
writing macro CN New Users to Excel 2 August 2nd 05 06:16 PM
Help writing a macro alldreams Excel Programming 0 June 4th 04 08:24 AM
help in writing a macro slim[_2_] Excel Programming 1 February 13th 04 01:41 AM
Macro Writing Help? Richard[_22_] Excel Programming 2 December 31st 03 07:39 PM


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