+ Reply to Thread
Results 1 to 7 of 7

Returning a Value from a table based on the last non zero entry in the table

  1. #1
    Registered User
    Join Date
    03-05-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    26

    Exclamation Returning a Value from a table based on the last non zero entry in the table

    Hi,

    I am trying to basically search for the last non zero entry in a column and then return a value in the same row as that last non zero entry.
    For example,

    My first column of the table is time, second column is submission/marking of coursework (denoted by +1 & -1) and the third column is the number of courseworks awaiting to be marked. My aim is to search the third column for the last non zero value then return the time (from first column) that last non zero value appears.

    Thanks in advance!

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Returning a Value from a table based on the last non zero entry in the table

    Since you did not provide any cell range references I would only suggest a concept that you can adapt to whatever you are trying to do:

    This assumes that data in Column A range A2:A8

    ***enter this array formula in C2 using Ctrl+Shift+Enter combination

    =INDEX($A$2:$A$8,LARGE(IF($A$2:$A$8<>0,ROW($A$2:$A$8)-1,""),1))

    A
    B
    C
    1
    Values Last non-0
    2
    2
    7
    3
    65
    4
    12
    5
    25
    6
    0
    7
    0
    8
    7
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    03-05-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Returning a Value from a table based on the last non zero entry in the table

    Hi thanks for the quick reply! I have tried to adapt that formula but keep receiving error. Maybe it'll help if you can see the table i wish to able it to. I have posted the spreadsheet. The table i am referring to is the big two way table to the right. The red cell is where i wish for the value to be appear. I aim to check the biggest value in the last row of the table (row 112) and according to the biggest value, i would like the corresponding column title to be entered in the cell. thanks again!
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Returning a Value from a table based on the last non zero entry in the table

    Not sure if there is a problem with your file???????? I opened it, cannot move anywhere in the sheet - or even select other sheets. My excel in fact seems to have hung, I cannot even select any other workbooks I had open!!!!
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Returning a Value from a table based on the last non zero entry in the table

    OK excel eventually crashed

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Returning a Value from a table based on the last non zero entry in the table

    Unless my excel is colorblind, there are no red cells in your workbook. It would really help if you could answer few simple questions: What the sheet name, what is the cell that you want your formula be (A1 or C2, etc) and what is the range of cells that the values is located.

    Thanks

  7. #7
    Registered User
    Join Date
    03-05-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Returning a Value from a table based on the last non zero entry in the table

    Apologies. This could be due to the fact i have two large data tables on the spreadsheet therefore it does run pretty slow

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sort pivot table based on first column entry
    By Derek Cavanagh in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-20-2013, 12:01 AM
  2. Replies: 1
    Last Post: 07-31-2013, 04:11 PM
  3. Returning data in one table based on the values from another table
    By excelignorant in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-24-2013, 04:12 AM
  4. Returning an entry from a table based on the current date
    By jshaw82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-14-2012, 12:37 PM
  5. Auto entry based on table
    By xlchallenged1 in forum Excel General
    Replies: 2
    Last Post: 09-17-2008, 01:44 PM

Tags for this Thread

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