ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Insert Name Define (https://www.excelbanter.com/excel-discussion-misc-queries/259819-insert-name-define.html)

Chris Johnson

Insert Name Define
 
Why does this work for a Name definition of a range?

=Sheet1!$A$3:INDEX(DataforCharts!$A:$A,MATCH(9.999 99E+307,DataforCharts!$A:$A))

It works but I can't figure out why. The INDEX returns the value of the
last cell with data in it, however if I just replace all of that with the
value it does not work anymore. For example this does NOT work.

=Sheet1!$A$3:40857

Dave Peterson

Insert Name Define
 
Actually, this portion:

=MATCH(9.99999E+307,DataforCharts!$A:$A)

returns the last row in column A of the DataForCharts worksheet that has numeric
data in it.


But you didn't translate the =index() portion. That would include the column
reference, too.
Essentially:

=Sheet1!$A$3:A40857




Chris Johnson wrote:

Why does this work for a Name definition of a range?

=Sheet1!$A$3:INDEX(DataforCharts!$A:$A,MATCH(9.999 99E+307,DataforCharts!$A:$A))

It works but I can't figure out why. The INDEX returns the value of the
last cell with data in it, however if I just replace all of that with the
value it does not work anymore. For example this does NOT work.

=Sheet1!$A$3:40857


--

Dave Peterson


All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com