+ Reply to Thread
Results 1 to 114 of 114

Index function works in A2, but not in A10, Why is that? Cant figure it out.

  1. #1
    Registered User
    Join Date
    04-17-2004
    Posts
    39

    Arrow Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi

    I have still tried to make heads or tail out of this, and still cant get it right.

    I have attatched a file, what is it that I need to modify here? I have tried changing the ranges, but it seems as if it is 9 rows out. any idea anyone?

    Regards
    Sonar
    Attached Files Attached Files

  2. #2
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  3. #3
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  4. #4
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  5. #5
    Registered User
    Join Date
    04-17-2004
    Posts
    39
    Hi Biff,

    You are quite correct. The problem now is, is that my information in 3DBC only starts on line 10 in the original file, and has to be displayed in line 10 in sheet "Short". But I dont know how to change the range to display it correctly. Can you help with this?

    Thanks.
    Sonar

  6. #6
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  7. #7
    Registered User
    Join Date
    04-17-2004
    Posts
    39
    Hi Biff

    Thanks for the help, my only problem now is, is that I get a #Num error from row 11 onwards when I want to try and change the range from 10:999, why is that?

    (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999, SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}

    If I can understand what it is that rules this, I can manage it.

    Regards
    Sonar
    Last edited by sonar; 08-28-2005 at 03:11 AM.

  8. #8
    Registered User
    Join Date
    04-17-2004
    Posts
    39

    Thumbs up

    Hi Biff

    I decided to look at modifying the second option, and that worked perfectly.

    Thanks for all the help.

    You guys rock!

    Regards
    Sonar

  9. #9
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  10. #10
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  11. #11
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  12. #12
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  13. #13
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  14. #14
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  15. #15
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  16. #16
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  17. #17
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  18. #18
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  19. #19
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  20. #20
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  21. #21
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  22. #22
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  23. #23
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  24. #24
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  25. #25
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  26. #26
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  27. #27
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  28. #28
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  29. #29
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  30. #30
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  31. #31
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  32. #32
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  33. #33
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  34. #34
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  35. #35
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  36. #36
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  37. #37
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  38. #38
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  39. #39
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  40. #40
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  41. #41
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  42. #42
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  43. #43
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  44. #44
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  45. #45
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  46. #46
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  47. #47
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  48. #48
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  49. #49
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  50. #50
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  51. #51
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  52. #52
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  53. #53
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  54. #54
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  55. #55
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  56. #56
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  57. #57
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  58. #58
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  59. #59
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  60. #60
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  61. #61
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  62. #62
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  63. #63
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  64. #64
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  65. #65
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  66. #66
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  67. #67
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  68. #68
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  69. #69
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  70. #70
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  71. #71
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  72. #72
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  73. #73
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  74. #74
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  75. #75
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  76. #76
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  77. #77
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  78. #78
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  79. #79
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  80. #80
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  81. #81
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  82. #82
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  83. #83
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  84. #84
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  85. #85
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  86. #86
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  87. #87
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  88. #88
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  89. #89
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  90. #90
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  91. #91
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  92. #92
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  93. #93
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  94. #94
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  95. #95
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  96. #96
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  97. #97
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  98. #98
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  99. #99
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  100. #100
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  101. #101
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  102. #102
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  103. #103
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  104. #104
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  105. #105
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  106. #106
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  107. #107
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  108. #108
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  109. #109
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  110. #110
    Bob Phillips
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    You are trying to reference outside of the range.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:

    http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  111. #111
    Sandy Mann
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Most people will not open an attachment for fear of viruses and other
    nasties. Try to describe your problem in text and I am sure that someone
    will help you

    --
    HTH

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  112. #112
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    I'm looking at your file. What are you trying to do?

    It looks like you want to extract data from column A and B if column V is
    not blank. Is that correct?

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have still tried to make heads or tail out of this, and still cant
    > get it right.
    >
    > I have attatched a file, what is it that I need to modify here? I have
    > tried changing the ranges, but it seems as if it is 9 rows out. any
    > idea anyone?
    >
    > Regards
    > Sonar
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: test.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=3755 |
    > +-------------------------------------------------------------------+
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  113. #113
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    Based on your sample file...

    In Short!A10 enter this formula using the key combo of CTRL,SHIFT,ENTER:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW($1:$16)),ROW(1:1))),"")

    Copy across to B10 then down until you get blanks.

    Note: ROW($1:$16) refers to the SIZE of the range. The physical location of
    the range is row 10:25. This range contains 16 elements, thus: ROW($1:$16).

    If you don't feel like counting how many elements are in the range you can
    use a dynamic method right in the formula:

    =IF(ROWS($1:1)<=COUNT('3DBC'!$V$10:$V$25),INDEX('3DBC'!A$10:A$25,SMALL(IF('3DBC'!$V$10:$V$25<>"",ROW(INDIRECT("1:"&COUNT('3DBC'!$A$10:$A$25)))),ROW(1:1))),"")

    This also assumes that there will be no empty cells within the range of
    column A. (none in your sample)

    I like how you shortened those sheet names! <g>

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff,
    >
    > You are quite correct. The problem now is, is that my information in
    > 3DBC only starts on line 10 in the original file, and has to be
    > displayed in line 10 in sheet "Short". But I dont know how to change
    > the range to display it correctly. Can you help with this?
    >
    > Thanks.
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




  114. #114
    Biff
    Guest

    Re: Index function works in A2, but not in A10, Why is that? Cant figure it out.

    Hi!

    > If I can understand what it is that rules this, I can manage it.


    Actually, this is a very simple formula once you understand how it works.

    The problem you encountered is the one most people have with this type of
    formula.

    The INDEX function is used to hold an array of values. In this case that
    array is A10:A999. This array holds a total of 990 values. Even though the
    physical location of this array is A10:A999, the "virtual array" that is
    being held in the INDEX function starts with position 1 through position
    990. Where:

    A10 is in the 1st position
    A11 is in the 2nd position
    A12 is in the 3rd position
    ....
    A999 is in the 990th position

    Now, this is where the ROW($1:$999) function comes into play and is where
    people usually make their mistakes. The argument to the ROW( ) function
    *MUST MATCH EXACTLY* the SIZE of the array being held in the INDEX function.
    In this case that would be: ROW($1:$990).

    The logical test in the IF function returns the corresponding value from the
    ROW($1:$990) function and that value in turn returns the corresponding value
    from the INDEX array.

    Biff

    "sonar" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Biff
    >
    > Thanks for the help, my only problem now is, is that I get a #Num error
    > from row 11 onwards when I want to try and change the range from 10:999,
    > why is that?
    >
    > (=IF(ROWS($1:2)<=COUNT('3DBC'!$V$10:$V$999),INDEX('3DBC'!A$10:A$999,
    > SMALL(IF('3DBC'!$V$10:$V$999<>"",ROW($1:$999)),ROW(2:2))),"")}
    >
    > If I can understand what it is that rules this, I can manage it.
    >
    > Regards
    > Sonar
    >
    >
    > --
    > sonar
    > ------------------------------------------------------------------------
    > sonar's Profile:
    > http://www.excelforum.com/member.php...fo&userid=8424
    > View this thread: http://www.excelforum.com/showthread...hreadid=399751
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1