Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default dynamic range with a table below the working table

I need to creat a dynamic range that that expands as the range of data
grows but ignors a table of data that is a few lines below the active
table. using the countA function to check for empty cells works but
if I have the entire colum as the count range it checks for all non
empty cells which messes up the range. Im looking for something like
Selection.End(xlDown) in VBA that will go to the first empty cell so I
dont get into the next table of data.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default dynamic range with a table below the working table

One way:

Dynamic range from A1 to the first empty cell in column A:

=A1:INDEX(A1:A100,MATCH(1,INDEX(--(A1:A100=""),,1),0)-1)


--
Biff
Microsoft Excel MVP


"Robert H" wrote in message
...
I need to creat a dynamic range that that expands as the range of data
grows but ignors a table of data that is a few lines below the active
table. using the countA function to check for empty cells works but
if I have the entire colum as the count range it checks for all non
empty cells which messes up the range. Im looking for something like
Selection.End(xlDown) in VBA that will go to the first empty cell so I
dont get into the next table of data.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default dynamic range with a table below the working table

On Mar 11, 5:48 pm, "T. Valko" wrote:
One way:

Dynamic range from A1 to the first empty cell in column A:

=A1:INDEX(A1:A100,MATCH(1,INDEX(--(A1:A100=""),,1),0)-1)

--
Biff
Microsoft Excel MVP
Thanks Biff I'm trying it out


Robert
"Robert H" wrote in message

...

I need to creat a dynamic range that that expands as the range of data
grows but ignors a table of data that is a few lines below the active
table. using the countA function to check for empty cells works but
if I have the entire colum as the count range it checks for all non
empty cells which messes up the range. Im looking for something like
Selection.End(xlDown) in VBA that will go to the first empty cell so I
dont get into the next table of data.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default dynamic range with a table below the working table

Biff, thanks for the help. When I use that formula in the name I get
weird results. here is what Im trying to do.
In column b I have a vertical list of factors. right now only three,
Material, Temp and Soak Time which ocupy B2 through B4. b1 is the
header "Factors". I created a name fctrRng with the formula:
=B1:INDEX(B1:B100,MATCH(1,INDEX(--(B1:B100=""),,1),0)-1)

when I go back and look at the formula for the name its changed to:
=MP1!G3:INDEX(MP1!G102:G3,MATCH(1,INDEX(--(MP1!G102:G3=""),,1),0)-1)

Each time I go back and replace the formula and try to use the range,
the range is something different ever though nothing has changed on
the worksheet.

Im sure this is some element of using excel that I have not ran into
yet, but it looks like random data selection.

FYI, for staters Im using the name in a count function to count how
many factors are listed. COUNTA(fctrRng)

Robert

On Mar 11, 5:48*pm, "T. Valko" wrote:
One way:

Dynamicrangefrom A1 to thefirstemptycellin column A:

=A1:INDEX(A1:A100,MATCH(1,INDEX(--(A1:A100=""),,1),0)-1)

--
Biff
Microsoft Excel MVP

"Robert H" wrote in message

...



I need to creat adynamicrangethat that expands as therangeof data
grows but ignors *a table of data that is a few lines below the active
table. *using the countA function to check foremptycells works but
if I have the entire colum as the countrangeit checks for all non
emptycells which messes up therange. *Im looking for something like
Selection.End(xlDown) in VBA that will go to thefirstemptycellso I
dont get into the next table of data.- Hide quoted text -


- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default dynamic range with a table below the working table

If you're going to use this as a named range then make the references
absolute:

=MP1!$B$2:INDEX(MP1!$B$2:$B$100,MATCH(1,INDEX(--(MP1!$B$2:$B$100=""),,1),0)-1)


--
Biff
Microsoft Excel MVP


"Robert H" wrote in message
...
Biff, thanks for the help. When I use that formula in the name I get
weird results. here is what Im trying to do.
In column b I have a vertical list of factors. right now only three,
Material, Temp and Soak Time which ocupy B2 through B4. b1 is the
header "Factors". I created a name fctrRng with the formula:
=B1:INDEX(B1:B100,MATCH(1,INDEX(--(B1:B100=""),,1),0)-1)

when I go back and look at the formula for the name its changed to:
=MP1!G3:INDEX(MP1!G102:G3,MATCH(1,INDEX(--(MP1!G102:G3=""),,1),0)-1)

Each time I go back and replace the formula and try to use the range,
the range is something different ever though nothing has changed on
the worksheet.

Im sure this is some element of using excel that I have not ran into
yet, but it looks like random data selection.

FYI, for staters Im using the name in a count function to count how
many factors are listed. COUNTA(fctrRng)

Robert

On Mar 11, 5:48 pm, "T. Valko" wrote:
One way:

Dynamicrangefrom A1 to thefirstemptycellin column A:

=A1:INDEX(A1:A100,MATCH(1,INDEX(--(A1:A100=""),,1),0)-1)

--
Biff
Microsoft Excel MVP

"Robert H" wrote in message

...



I need to creat adynamicrangethat that expands as therangeof data
grows but ignors a table of data that is a few lines below the active
table. using the countA function to check foremptycells works but
if I have the entire colum as the countrangeit checks for all non
emptycells which messes up therange. Im looking for something like
Selection.End(xlDown) in VBA that will go to thefirstemptycellso I
dont get into the next table of data.- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default dynamic range with a table below the working table

Thanks Biff, that works. Hopefully Ive learned my lesson about named
ranges needing to be absolute.
Robert



On Mar 12, 1:39*pm, "T. Valko" wrote:
If you're going to use this as a named range then make the references
absolute:

=MP1!$B$2:INDEX(MP1!$B$2:$B$100,MATCH(1,INDEX(--(MP1!$B$2:$B$100=""),,1),0)*-1)

--
Biff
Microsoft Excel MVP

"Robert H" wrote in message

...
Biff, thanks for the help. *When I use that formula in the name I get
weird results. here is what Im trying to do.
In column b I have a vertical list of factors. right now only three,
Material, Temp and Soak Time which ocupy B2 through B4. b1 is the
header "Factors". *I created a name fctrRng with the formula:
=B1:INDEX(B1:B100,MATCH(1,INDEX(--(B1:B100=""),,1),0)-1)

when I go back and look at the formula for the name its changed to:
=MP1!G3:INDEX(MP1!G102:G3,MATCH(1,INDEX(--(MP1!G102:G3=""),,1),0)-1)

Each time I go back and replace the formula and try to use the range,
the range is something different ever though nothing has changed on
the worksheet.

Im sure this is some element of using excel that I have not ran into
yet, but it looks like random data selection.

FYI, for staters Im using the name in a count function to count how
many factors are listed. * COUNTA(fctrRng)

Robert

On Mar 11, 5:48 pm, "T. Valko" wrote:



One way:


Dynamicrangefrom A1 to thefirstemptycellin column A:


=A1:INDEX(A1:A100,MATCH(1,INDEX(--(A1:A100=""),,1),0)-1)


--
Biff
Microsoft Excel MVP


"Robert H" wrote in message


...


I need to creat adynamicrangethat that expands as therangeof data
grows but ignors a table of data that is a few lines below the active
table. using the countA function to check foremptycells works but
if I have the entire colum as the countrangeit checks for all non
emptycells which messes up therange. Im looking for something like
Selection.End(xlDown) in VBA that will go to thefirstemptycellso I
dont get into the next table of data.- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default dynamic range with a table below the working table

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Robert H" wrote in message
...
Thanks Biff, that works. Hopefully Ive learned my lesson about named
ranges needing to be absolute.
Robert



On Mar 12, 1:39 pm, "T. Valko" wrote:
If you're going to use this as a named range then make the references
absolute:

=MP1!$B$2:INDEX(MP1!$B$2:$B$100,MATCH(1,INDEX(--(MP1!$B$2:$B$100=""),,1),0)*-1)

--
Biff
Microsoft Excel MVP

"Robert H" wrote in message

...
Biff, thanks for the help. When I use that formula in the name I get
weird results. here is what Im trying to do.
In column b I have a vertical list of factors. right now only three,
Material, Temp and Soak Time which ocupy B2 through B4. b1 is the
header "Factors". I created a name fctrRng with the formula:
=B1:INDEX(B1:B100,MATCH(1,INDEX(--(B1:B100=""),,1),0)-1)

when I go back and look at the formula for the name its changed to:
=MP1!G3:INDEX(MP1!G102:G3,MATCH(1,INDEX(--(MP1!G102:G3=""),,1),0)-1)

Each time I go back and replace the formula and try to use the range,
the range is something different ever though nothing has changed on
the worksheet.

Im sure this is some element of using excel that I have not ran into
yet, but it looks like random data selection.

FYI, for staters Im using the name in a count function to count how
many factors are listed. COUNTA(fctrRng)

Robert

On Mar 11, 5:48 pm, "T. Valko" wrote:



One way:


Dynamicrangefrom A1 to thefirstemptycellin column A:


=A1:INDEX(A1:A100,MATCH(1,INDEX(--(A1:A100=""),,1),0)-1)


--
Biff
Microsoft Excel MVP


"Robert H" wrote in message


...


I need to creat adynamicrangethat that expands as therangeof data
grows but ignors a table of data that is a few lines below the active
table. using the countA function to check foremptycells works but
if I have the entire colum as the countrangeit checks for all non
emptycells which messes up therange. Im looking for something like
Selection.End(xlDown) in VBA that will go to thefirstemptycellso I
dont get into the next table of data.- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default dynamic range with a table below the working table

Im back :O

Once I got the my working using your sugestion I went back and am
trying to understand the formula you provided. Im am lost on the index
that is used for the Match, lookup_array. In INDEX(--(B1:B100="") I
dont understand the --( It looks like its used as a function but I
cant find any referece to that.
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default dynamic range with a table below the working table

This expression will return an array of either TRUE or FALSE:

(B1:B100="")

For example:

B1="" = FALSE
B2="" = FALSE
B3="" = FALSE
B4="" = TRUE
B5="" = TRUE
B6="" = FALSE

Since our MATCH lookup_value is 1 we need to convert those TRUE and FALSE to
numbers. The "--" does just that, it coerces TRUE to 1 and FALSE to 0:

--(B1="") = 0
--(B2="") = 0
--(B3="") = 0
--(B4="") = 1
--(B5="") = 1
--(B6="") = 0

Now our MATCH lookup_value will match the *first 1* of that array which
would be the reference at B4. So, the evalauted range would be from B1:B4
but don't forget that in the original formula we're subtracting 1 from MATCH
so in the end the evaluated range would be B1:B3.


--
Biff
Microsoft Excel MVP


"Robert H" wrote in message
...
Im back :O

Once I got the my working using your sugestion I went back and am
trying to understand the formula you provided. Im am lost on the index
that is used for the Match, lookup_array. In INDEX(--(B1:B100="") I
dont understand the --( It looks like its used as a function but I
cant find any referece to that.



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default dynamic range with a table below the working table

I made an modification to the formula so I wouldent have to remember
to set the test range, reqired in the original "$A$1:$A$100"
I replaced thhe range with a standard dynamic range formula. In the
match section I had to add one cell to the count for casses when there
is no table following the target table otherwise match would fail.

Sheet1!$A$1:INDEX(OFFSET(Sheet1!$A$1,0,0,COUNTA(Sh eet1!$A:$A),
1),MATCH(1,INDEX(--(OFFSET(Sheet1!$A$1,0,0,(COUNTA(Sheet1!$A:$A)+1),
1)=""),,1),0)-1)

I tested this with several number scenarios and it seems fail safe for
my application. If you see anything wrong please let me know.
Robert

On Mar 13, 6:06*pm, "T. Valko" wrote:
This expression will return an array of either TRUE or FALSE:

(B1:B100="")

For example:

B1="" = FALSE
B2="" = FALSE
B3="" = FALSE
B4="" = TRUE
B5="" = TRUE
B6="" = FALSE

Since our MATCH lookup_value is 1 we need to convert those TRUE and FALSE to
numbers. The "--" does just that, it coerces TRUE to 1 and FALSE to 0:

--(B1="") = 0
--(B2="") = 0
--(B3="") = 0
--(B4="") = 1
--(B5="") = 1
--(B6="") = 0

Now our MATCH lookup_value will match the *first 1* of that array which
would be the reference at B4. So, the evalauted range would be from B1:B4
but don't forget that in the original formula we're subtracting 1 from MATCH
so in the end the evaluated range would be B1:B3.

--
Biff
Microsoft Excel MVP

"Robert H" wrote in message

...



Im back :O


Once I got the my working using your sugestion I went back and am
trying to understand the formula you provided. Im am lost on the index
that is used for the Match, lookup_array. *In INDEX(--(B1:B100="") I
dont understand the --( *It looks like its used as a function but I
cant find any referece to that.- Hide quoted text -


- Show quoted text -


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
(Max - Min) for a dynamic range within a table [email protected] Excel Worksheet Functions 4 November 6th 07 01:32 AM
Dynamic range in Pivot table Wanna Learn Excel Discussion (Misc queries) 4 July 2nd 07 08:08 PM
Populate a table with a dynamic range Jeff Excel Worksheet Functions 3 February 22nd 07 06:47 AM
Dynamic Range in a Pivot Table Chris C Excel Discussion (Misc queries) 0 June 27th 06 06:11 PM
Crate group of date, with Dynamic Range in pivot table not working Tiya Excel Discussion (Misc queries) 3 March 1st 06 02:26 PM


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