+ Reply to Thread
Results 1 to 11 of 11

Pick the last reading and time of that reading

  1. #1
    Registered User
    Join Date
    10-19-2011
    Location
    Billings, MT
    MS-Off Ver
    Excel 2003
    Posts
    74

    Smile Pick the last reading and time of that reading

    HI
    I thought I knew Excel, but I am getting in areas I don't know very well. I have a table of gauged heights and the gauges or readings are done between 4 tanks. Each hour a tank is gauged until it is full and than we starting filling the next tank. I need to come up with two items or figures. I need to know what time the last reading was taking and what tank that reading came from. I guess I need to create a table or and array, but like I wrote, I just do not know how or what excel functions to use. Your help will be appreciated.
    Oh, I have attach a sample sheet.
    Thanks again
    Ted
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Pick the last reading and time of that reading

    Questions

    Are the tanks filled in sequence Tank 1 then Tank 2 then Tank 3 then Tank 4 then Tank 1 ...??

    The number sequences look messed up. As the tanks fill over time, the heights should increase(not decrease like tank 3 7-9 am).

    Number are filled in ONLY while the tanks are being filled?

  3. #3
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Pick the last reading and time of that reading

    For the first part of your problem, this will give you the time of the last reading, im working out the second part now

    =INDEX(B1:B35,MAX(IF(C11:F35<>"",ROW(C11:C35),0)))

    this is an array formula, and should be confirmed with Ctrl+Shift+Enter
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Pick the last reading and time of that reading

    you can complete the second task with VLOOKUPs and Nested IF's there is probably a better way, but im hitting a block right now

    =IF(VLOOKUP(E37,B:F,2,0)<>"","Tank 1",IF(VLOOKUP(E37,B:F,3,0)<>"","Tank 2",IF(VLOOKUP(E37,B:F,4,0)<>"","Tank 3",IF(VLOOKUP(E37,B:F,5,0)<>"","Tank 4",""))))

  5. #5
    Registered User
    Join Date
    10-19-2011
    Location
    Billings, MT
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Pick the last reading and time of that reading

    Most of the time, the tanks are filled in sequence but there could be times when we mixed things up. Sometimes, we only have 3 tanks to work with too. When you see the numbers decrease, that is show the tank was unload and is ready to be filled again.
    Thanks
    Ted

  6. #6
    Registered User
    Join Date
    10-19-2011
    Location
    Billings, MT
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Pick the last reading and time of that reading

    Dgagnon, thanks for the first part or the time of day. It is working. I can not get your next equation to work as it is giving me a (0) for an answer.
    Thanks

  7. #7
    Registered User
    Join Date
    10-19-2011
    Location
    Billings, MT
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Pick the last reading and time of that reading

    Dgagnon, I posted your 2nd equation into the my sample work sheet, and it works. Thanks, but I have a question. I posted it to my spreadsheet, changed E37 and B:F to reflect the new worksheet, and it does not work. Do I have to change anything else? Like 2,0 or 3,0?
    Thanks
    Ted

  8. #8
    Registered User
    Join Date
    10-19-2011
    Location
    Billings, MT
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Pick the last reading and time of that reading

    Thanks, I got it to work!!!!!
    Ted

  9. #9
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Pick the last reading and time of that reading

    Sorry i was away from my PC for a bit, glad you got it to work though.

  10. #10
    Registered User
    Join Date
    10-19-2011
    Location
    Billings, MT
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Pick the last reading and time of that reading

    HI DGagon
    I have a strange issue with the vlookup equation. The current answer is 1, but when I test that with an If/than statement, 1 does not equal 1. Do you know what is happening here?
    Thanks
    Ted

  11. #11
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Pick the last reading and time of that reading

    is the answer the number 1, or the text string "1"? could you attach an updated example sheet?

+ 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