+ Reply to Thread
Results 1 to 5 of 5

Array Formulas and Last Cell

  1. #1
    PosseJohn
    Guest

    Array Formulas and Last Cell

    I have an array formula that extends 1500 rows. The formula in the cells
    return data from another source. I need to graph this data, but the graph
    (as expected) plots all the cells with no actual value.

    How do I detect what row the last real value is contained in?

  2. #2
    Vasant Nanavati
    Guest

    Re: Array Formulas and Last Cell

    =MAX(ROW(A1:A1500)*(A1:A1500<>""))

    entered as an array formula with <Ctrl> <Shift> <Enter>.

    --

    Vasant


    "PosseJohn" <PosseJohn@discussions.microsoft.com> wrote in message
    news:B03D390D-7CBE-43B4-805F-946503C313AA@microsoft.com...
    > I have an array formula that extends 1500 rows. The formula in the cells
    > return data from another source. I need to graph this data, but the graph
    > (as expected) plots all the cells with no actual value.
    >
    > How do I detect what row the last real value is contained in?




  3. #3
    PosseJohn
    Guest

    Re: Array Formulas and Last Cell

    I need to do this in VBA. I do not have the ROW function available.



    "Vasant Nanavati" wrote:

    > =MAX(ROW(A1:A1500)*(A1:A1500<>""))
    >
    > entered as an array formula with <Ctrl> <Shift> <Enter>.
    >
    > --
    >
    > Vasant
    >
    >
    > "PosseJohn" <PosseJohn@discussions.microsoft.com> wrote in message
    > news:B03D390D-7CBE-43B4-805F-946503C313AA@microsoft.com...
    > > I have an array formula that extends 1500 rows. The formula in the cells
    > > return data from another source. I need to graph this data, but the graph
    > > (as expected) plots all the cells with no actual value.
    > >
    > > How do I detect what row the last real value is contained in?

    >
    >
    >


  4. #4
    Vasant Nanavati
    Guest

    Re: Array Formulas and Last Cell

    Simplified version:

    Function LastRow() As Long
    Dim i As Long
    For i = 1500 to 1 Step -1
    If Range(i, 1) <> "" Then
    LastRow = i
    Exit For
    End If
    Next
    End Function

    --

    Vasant



    "PosseJohn" <PosseJohn@discussions.microsoft.com> wrote in message
    news:44CF4427-56C5-49A4-A27A-0F28B6F8FC39@microsoft.com...
    > I need to do this in VBA. I do not have the ROW function available.
    >
    >
    >
    > "Vasant Nanavati" wrote:
    >
    > > =MAX(ROW(A1:A1500)*(A1:A1500<>""))
    > >
    > > entered as an array formula with <Ctrl> <Shift> <Enter>.
    > >
    > > --
    > >
    > > Vasant
    > >
    > >
    > > "PosseJohn" <PosseJohn@discussions.microsoft.com> wrote in message
    > > news:B03D390D-7CBE-43B4-805F-946503C313AA@microsoft.com...
    > > > I have an array formula that extends 1500 rows. The formula in the

    cells
    > > > return data from another source. I need to graph this data, but the

    graph
    > > > (as expected) plots all the cells with no actual value.
    > > >
    > > > How do I detect what row the last real value is contained in?

    > >
    > >
    > >




  5. #5
    PosseJohn
    Guest

    Re: Array Formulas and Last Cell

    That works great, thankyou for your brain.

    "Vasant Nanavati" wrote:

    > Simplified version:
    >
    > Function LastRow() As Long
    > Dim i As Long
    > For i = 1500 to 1 Step -1
    > If Range(i, 1) <> "" Then
    > LastRow = i
    > Exit For
    > End If
    > Next
    > End Function
    >
    > --
    >
    > Vasant
    >
    >
    >
    > "PosseJohn" <PosseJohn@discussions.microsoft.com> wrote in message
    > news:44CF4427-56C5-49A4-A27A-0F28B6F8FC39@microsoft.com...
    > > I need to do this in VBA. I do not have the ROW function available.
    > >
    > >
    > >
    > > "Vasant Nanavati" wrote:
    > >
    > > > =MAX(ROW(A1:A1500)*(A1:A1500<>""))
    > > >
    > > > entered as an array formula with <Ctrl> <Shift> <Enter>.
    > > >
    > > > --
    > > >
    > > > Vasant
    > > >
    > > >
    > > > "PosseJohn" <PosseJohn@discussions.microsoft.com> wrote in message
    > > > news:B03D390D-7CBE-43B4-805F-946503C313AA@microsoft.com...
    > > > > I have an array formula that extends 1500 rows. The formula in the

    > cells
    > > > > return data from another source. I need to graph this data, but the

    > graph
    > > > > (as expected) plots all the cells with no actual value.
    > > > >
    > > > > How do I detect what row the last real value is contained in?
    > > >
    > > >
    > > >

    >
    >
    >


+ 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