+ Reply to Thread
Results 1 to 11 of 11

Find time by name

  1. #1
    Registered User
    Join Date
    02-17-2013
    Location
    Arkansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Find time by name

    I am having trouble coming up with a formula to grab the first and last time scanned by name of scanner.

    amoung other coloumns there is

    F I K M
    Scan Time Scanner ID Scanner ID First Time Scanned
    2:45:00 ASL_12 ASL_12



    assume that coloumn F and I have a large number of rows attached, perhaps 300+. What I need is to pull out the time of the first scan where coloumn K matches coloumn I, I have so far been unsuccessful. Can anyone help?

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Find time by name

    I can't tell which values are in which column, with a little more clarity (or an uploaded example) a formula should be fairly straightforward.
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Registered User
    Join Date
    02-17-2013
    Location
    Arkansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Find time by name

    Here is an attachment of the WKS I am using, hopefully this makes things more clear
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Find time by name

    The easiest solution for this is a pivot table:
    Insert a dynamic named range for your dataset:
    Alt, i, n, d (brings up named range interface)
    New
    Name: 'Scans'
    Refers to: =$A$1:index($I:$I,counta($A:$A))
    OK
    Create a pivot:
    Alt, d, p (brings up pivot table dialogue)
    Next
    Range: =Scans
    Next
    Existing worksheet, R1
    Finish
    Customise pivot:
    Check in Scanner ID (adds to row fields)
    First:
    Drag 'Scanned' to values
    Right-click 'Count of Scanned'
    Value field settings
    Summarize by min
    Number format Time
    Last: per first, except summarize by max
    Scanned stations: Drag Scanner ID to Values

    Done

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Find time by name

    Hi jaluht

    See the attached file. would this be of any help.
    Attached Files Attached Files
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: Find time by name

    Try this in M2 and drag down.


    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-17-2013
    Location
    Arkansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Find time by name

    This worked excellent, thank you.

    Now I seems to be encountering another problem. I am using a macro to make the pivot table which works fine, but I want to add a pivot chart and the macro keeps stalling because every time i enter new data it changes the chart name, ie Chart 1, Chart 2, etc. Is there any way to fix this problem?

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: Find time by name

    Thanks for compliment .Pl mark the thread solved.

  9. #9
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Find time by name

    @ kvsrinivasamurthy

    This will give a incorrect result if a scanner is entered in row 25 with a earlier time! See the attached file.
    =INDEX(F:F,MATCH(K2,I:I,0))
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Find time by name

    Quote Originally Posted by jaluht View Post
    This worked excellent, thank you.

    Now I seems to be encountering another problem. I am using a macro to make the pivot table which works fine, but I want to add a pivot chart and the macro keeps stalling because every time i enter new data it changes the chart name, ie Chart 1, Chart 2, etc. Is there any way to fix this problem?
    Can you upload what you have? I wouldn't have thought you want multiple charts (may be wrong?) if not - an approach along the lines of:
    (optionally) delete charts if the are already there - to avoid conflicts, but may be a problem depending on set up
    Add new chart
    Address it by index (slightly different approach depending on whether the chart is on-sheet or on its own tab) - basically the approach worksheets("x").charts(1) will always find the first chart - if there's only one, that will be reliable.

    You might be able to follow the principles above, depending on your VBA skill, if not, I'd need an example to be more precise.

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: Find time by name

    @ Kevin UK

    THIS GIVES CORRECT RESULT

    Please Login or Register  to view this content.

+ 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