Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default referencing a named range from a closed workbook

hi all, here's what i've been able to do in order to get this to work

Problem:
Dynamically created named ranges in a closed workbook are not accessable
from another workbook

Solution:
in the new workbook create a new worksheet
in A1 use this formula
=counta('c:\temp\[Book2.xls]Sheet1'!$A$1:$A$10000)
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is your sheet name
and the range is starting from your first data entry, and the end
is well beyond the last data entry (if your list will grow,otherwise end it
at your last data entry). Adjust this with +/- if you have data above or
below that you do not want to include in this dynamic range. (ie if you have
a header row, append a '-1' to the end of the formula)

in A2 use this formula
='c:\temp\[Book2.xls]Sheet1'!$A1
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is the sheet name of the source data
and $A1 is the starting point of your data
copy this down to A10000 or wherever you want to stop (best to copy it down
to wherever you stopped in the COUNTA function above)
(if you have many data ranges as I did, you may want to repeat the first two
steps until you are done creating the source locations and then copy the
range A2:??2 down especailly if you are going to 10000 or wherever...) (ie A3
should be =.......$A2, etc etc)

now create a named range using:
=$A$2:index($A$2:$A$10000,$A$1)

and now you can use your newly created dynamic ranges in your new workbook
to do things like:

=sumproduct((MyNamedRange1="A")*(MyNamedRange2="B" )*MyNamedRange3)
(as an array formula)

i found this especially helpful in creating a summary workbook for orders,
inventory, customer tracking, etc for a person that only wanted to see that
data, and would never have the source workbook open.

then you can set the new workbook to always update the links.

hope this helps!

if there's any clarification needed (or i made an error) let me know

J

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default referencing a named range from a closed workbook

='c:\temp\[Book2.xls]Sheet1'!$A1
in A1 of a sheet, then drag down for as far as you think you will need
is about all that is needed. Any other decisions can be made in the
workbook with the formulas.

--
Regards,
Tom Ogilvy




"Gixxer_J_97" wrote in message
...
hi all, here's what i've been able to do in order to get this to work

Problem:
Dynamically created named ranges in a closed workbook are not accessable
from another workbook

Solution:
in the new workbook create a new worksheet
in A1 use this formula
=counta('c:\temp\[Book2.xls]Sheet1'!$A$1:$A$10000)
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is your sheet name
and the range is starting from your first data entry, and the

end
is well beyond the last data entry (if your list will grow,otherwise end

it
at your last data entry). Adjust this with +/- if you have data above or
below that you do not want to include in this dynamic range. (ie if you

have
a header row, append a '-1' to the end of the formula)

in A2 use this formula
='c:\temp\[Book2.xls]Sheet1'!$A1
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is the sheet name of the source data
and $A1 is the starting point of your data
copy this down to A10000 or wherever you want to stop (best to copy it

down
to wherever you stopped in the COUNTA function above)
(if you have many data ranges as I did, you may want to repeat the first

two
steps until you are done creating the source locations and then copy the
range A2:??2 down especailly if you are going to 10000 or wherever...) (ie

A3
should be =.......$A2, etc etc)

now create a named range using:
=$A$2:index($A$2:$A$10000,$A$1)

and now you can use your newly created dynamic ranges in your new workbook
to do things like:

=sumproduct((MyNamedRange1="A")*(MyNamedRange2="B" )*MyNamedRange3)
(as an array formula)

i found this especially helpful in creating a summary workbook for orders,
inventory, customer tracking, etc for a person that only wanted to see

that
data, and would never have the source workbook open.

then you can set the new workbook to always update the links.

hope this helps!

if there's any clarification needed (or i made an error) let me know

J



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default referencing a named range from a closed workbook

correct, however if you use the COUNTA function (to count how many items
there actually are - and then use the INDEX function using that count) it is
helpful to keep it in the same column, which is why I started in A1 as the
'count' and A2 as the start of the 'copied' data (it was easier for me since
i had 20 named dynamic ranges that i was working with)

J


"Tom Ogilvy" wrote:

='c:\temp\[Book2.xls]Sheet1'!$A1
in A1 of a sheet, then drag down for as far as you think you will need
is about all that is needed. Any other decisions can be made in the
workbook with the formulas.

--
Regards,
Tom Ogilvy




"Gixxer_J_97" wrote in message
...
hi all, here's what i've been able to do in order to get this to work

Problem:
Dynamically created named ranges in a closed workbook are not accessable
from another workbook

Solution:
in the new workbook create a new worksheet
in A1 use this formula
=counta('c:\temp\[Book2.xls]Sheet1'!$A$1:$A$10000)
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is your sheet name
and the range is starting from your first data entry, and the

end
is well beyond the last data entry (if your list will grow,otherwise end

it
at your last data entry). Adjust this with +/- if you have data above or
below that you do not want to include in this dynamic range. (ie if you

have
a header row, append a '-1' to the end of the formula)

in A2 use this formula
='c:\temp\[Book2.xls]Sheet1'!$A1
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is the sheet name of the source data
and $A1 is the starting point of your data
copy this down to A10000 or wherever you want to stop (best to copy it

down
to wherever you stopped in the COUNTA function above)
(if you have many data ranges as I did, you may want to repeat the first

two
steps until you are done creating the source locations and then copy the
range A2:??2 down especailly if you are going to 10000 or wherever...) (ie

A3
should be =.......$A2, etc etc)

now create a named range using:
=$A$2:index($A$2:$A$10000,$A$1)

and now you can use your newly created dynamic ranges in your new workbook
to do things like:

=sumproduct((MyNamedRange1="A")*(MyNamedRange2="B" )*MyNamedRange3)
(as an array formula)

i found this especially helpful in creating a summary workbook for orders,
inventory, customer tracking, etc for a person that only wanted to see

that
data, and would never have the source workbook open.

then you can set the new workbook to always update the links.

hope this helps!

if there's any clarification needed (or i made an error) let me know

J




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default referencing a named range from a closed workbook

But I was suggesting not using the countA going to the closed workbook.
Untested, but I would bet that is slow. Unless size is a major
consideration, I would have a staging sheet that reproduces the data in the
local workbook and does the processing locally. CountA wouldn't work
locally because the linking formulas return 0, but with a familiarity with
the data there are other methods to determine the end of the data I would
think. Also, if you are doing Array formulas as you show, the columns would
need to be of equal length, so there is no need to determine the length for
each column individually.

--
Regards,
Tom Ogilvy




"Gixxer_J_97" wrote in message
...
correct, however if you use the COUNTA function (to count how many items
there actually are - and then use the INDEX function using that count) it

is
helpful to keep it in the same column, which is why I started in A1 as the
'count' and A2 as the start of the 'copied' data (it was easier for me

since
i had 20 named dynamic ranges that i was working with)

J


"Tom Ogilvy" wrote:

='c:\temp\[Book2.xls]Sheet1'!$A1
in A1 of a sheet, then drag down for as far as you think you will need
is about all that is needed. Any other decisions can be made in the
workbook with the formulas.

--
Regards,
Tom Ogilvy




"Gixxer_J_97" wrote in message
...
hi all, here's what i've been able to do in order to get this to work

Problem:
Dynamically created named ranges in a closed workbook are not

accessable
from another workbook

Solution:
in the new workbook create a new worksheet
in A1 use this formula
=counta('c:\temp\[Book2.xls]Sheet1'!$A$1:$A$10000)
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is your sheet name
and the range is starting from your first data entry, and

the
end
is well beyond the last data entry (if your list will grow,otherwise

end
it
at your last data entry). Adjust this with +/- if you have data above

or
below that you do not want to include in this dynamic range. (ie if

you
have
a header row, append a '-1' to the end of the formula)

in A2 use this formula
='c:\temp\[Book2.xls]Sheet1'!$A1
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is the sheet name of the source data
and $A1 is the starting point of your data
copy this down to A10000 or wherever you want to stop (best to copy it

down
to wherever you stopped in the COUNTA function above)
(if you have many data ranges as I did, you may want to repeat the

first
two
steps until you are done creating the source locations and then copy

the
range A2:??2 down especailly if you are going to 10000 or wherever...)

(ie
A3
should be =.......$A2, etc etc)

now create a named range using:
=$A$2:index($A$2:$A$10000,$A$1)

and now you can use your newly created dynamic ranges in your new

workbook
to do things like:

=sumproduct((MyNamedRange1="A")*(MyNamedRange2="B" )*MyNamedRange3)
(as an array formula)

i found this especially helpful in creating a summary workbook for

orders,
inventory, customer tracking, etc for a person that only wanted to see

that
data, and would never have the source workbook open.

then you can set the new workbook to always update the links.

hope this helps!

if there's any clarification needed (or i made an error) let me know

J






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default referencing a named range from a closed workbook

that is a very good point! i did each one because (after i tested it) it
wasn't too bad on speed (updating 20 colums x 10,000 rows each) and also as
an additional error check - as you pointed out, the source for the array
formulas need to be the same size.

I'll try it without using the COUNTA, as I would only need to check the
length of 4 ranges, instead of 20 - even doing the counta on 4 would be faster


"Tom Ogilvy" wrote:

But I was suggesting not using the countA going to the closed workbook.
Untested, but I would bet that is slow. Unless size is a major
consideration, I would have a staging sheet that reproduces the data in the
local workbook and does the processing locally. CountA wouldn't work
locally because the linking formulas return 0, but with a familiarity with
the data there are other methods to determine the end of the data I would
think. Also, if you are doing Array formulas as you show, the columns would
need to be of equal length, so there is no need to determine the length for
each column individually.

--
Regards,
Tom Ogilvy




"Gixxer_J_97" wrote in message
...
correct, however if you use the COUNTA function (to count how many items
there actually are - and then use the INDEX function using that count) it

is
helpful to keep it in the same column, which is why I started in A1 as the
'count' and A2 as the start of the 'copied' data (it was easier for me

since
i had 20 named dynamic ranges that i was working with)

J


"Tom Ogilvy" wrote:

='c:\temp\[Book2.xls]Sheet1'!$A1
in A1 of a sheet, then drag down for as far as you think you will need
is about all that is needed. Any other decisions can be made in the
workbook with the formulas.

--
Regards,
Tom Ogilvy




"Gixxer_J_97" wrote in message
...
hi all, here's what i've been able to do in order to get this to work

Problem:
Dynamically created named ranges in a closed workbook are not

accessable
from another workbook

Solution:
in the new workbook create a new worksheet
in A1 use this formula
=counta('c:\temp\[Book2.xls]Sheet1'!$A$1:$A$10000)
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is your sheet name
and the range is starting from your first data entry, and

the
end
is well beyond the last data entry (if your list will grow,otherwise

end
it
at your last data entry). Adjust this with +/- if you have data above

or
below that you do not want to include in this dynamic range. (ie if

you
have
a header row, append a '-1' to the end of the formula)

in A2 use this formula
='c:\temp\[Book2.xls]Sheet1'!$A1
whe c:\temp is the path to your workbook
Book2.xls is your workbook name
Sheet1 is the sheet name of the source data
and $A1 is the starting point of your data
copy this down to A10000 or wherever you want to stop (best to copy it
down
to wherever you stopped in the COUNTA function above)
(if you have many data ranges as I did, you may want to repeat the

first
two
steps until you are done creating the source locations and then copy

the
range A2:??2 down especailly if you are going to 10000 or wherever...)

(ie
A3
should be =.......$A2, etc etc)

now create a named range using:
=$A$2:index($A$2:$A$10000,$A$1)

and now you can use your newly created dynamic ranges in your new

workbook
to do things like:

=sumproduct((MyNamedRange1="A")*(MyNamedRange2="B" )*MyNamedRange3)
(as an array formula)

i found this especially helpful in creating a summary workbook for

orders,
inventory, customer tracking, etc for a person that only wanted to see
that
data, and would never have the source workbook open.

then you can set the new workbook to always update the links.

hope this helps!

if there's any clarification needed (or i made an error) let me know

J









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
How do I use indirect when referring to a named range in a closed Ed Green Excel Worksheet Functions 3 May 22nd 06 08:01 PM
INDIRECT and Named Ranges referencing closed workbook gpie Excel Worksheet Functions 9 October 6th 05 11:24 PM
VBA Referencing a Named Cell Range in another Workbook Frank & Pam Hayes[_2_] Excel Programming 5 June 29th 04 10:01 PM
referencing a closed workbook buckyduke Excel Programming 1 June 28th 04 01:54 PM
Problem with named Range in ADO extract from Closed Excel File Dave Bash Excel Programming 1 December 23rd 03 09:10 AM


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