+ Reply to Thread
Results 1 to 3 of 3

Read Last Inputted Value?

  1. #1
    Yin99
    Guest

    Read Last Inputted Value?


    Lets say I have a range of cells:
    Value1
    Value2
    Value3
    Value4



    How could I get Excel to (worksheet function, or vb macro) to read a
    Range of cells, and simply tell me what is the last value in the list?
    So in this case it would return Value4.

    However, if I had
    Value1
    Value2

    it would return Value2. I know I could probably write a vb macro to
    look at each cell in a specified range, call ISBLANK(Cell) ... Soon as
    I get TRUE, I know the value I was looking for was the last ISBLANK I
    called. But, is there an easier way? THanks,

    Yin99


  2. #2
    Forum Contributor
    Join Date
    03-15-2005
    Location
    North Carolina
    MS-Off Ver
    2003 & 2007
    Posts
    180
    Sub FindLastCell()
    Dim cell as Range

    set cell = Activesheet.Range("A1").end(xldown)

    end sub

  3. #3
    skatonni via OfficeKB.com
    Guest

    Re: Read Last Inputted Value?

    If the values are in Column A starting in the first row

    Sub lastValue()

    Range("A1").Select
    MsgBox Selection.End(xlDown).Value

    End Sub

    Yin99 wrote:
    >Lets say I have a range of cells:
    >Value1
    >Value2
    >Value3
    >Value4
    >
    >How could I get Excel to (worksheet function, or vb macro) to read a
    >Range of cells, and simply tell me what is the last value in the list?
    >So in this case it would return Value4.
    >
    >However, if I had
    >Value1
    >Value2
    >
    >it would return Value2. I know I could probably write a vb macro to
    >look at each cell in a specified range, call ISBLANK(Cell) ... Soon as
    >I get TRUE, I know the value I was looking for was the last ISBLANK I
    >called. But, is there an easier way? THanks,
    >
    >Yin99


    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...mming/200607/1

+ 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