+ Reply to Thread
Results 1 to 10 of 10

Import Log and find highest for each hour

  1. #1
    Registered User
    Join Date
    04-01-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    13

    Import Log and find highest for each hour

    I've got a text file formatted as shown below. I'm looking for a way to highlight the highest value after I import the file into excel.
    0:00_1
    0:01_1
    0:02_2
    0:03_2
    0:04_1

    * this continues for a 24hr period

    Thanks,
    Kevin

  2. #2
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Import Log and find highest for each hour

    Hi Kevin,

    What is considered to be the highest value, e.g. would 0:04_1 be higher than 0:03_2? Can you upload a sample and indicate the criteria which determines the highest value, is it the 0:00 part or the _1 suffix or some combination of the two?
    Thanks,
    HangMan

    You can say "Thank you!" by clicking Add Reputation below the post.
    Please, mark your thread [SOLVED] if you are happy with the solution.

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Import Log and find highest for each hour

    If the value after the _ is to be evaluated for being the max in the list this will separate out the value after the _
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The MAX function can then determine the max value in the column with the separated values.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    04-01-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Import Log and find highest for each hour

    HangMan-

    Sorry about that! After re-reading my post, I can see how I wasn't very clear. I have a batch file that runs every minute and grabs two bits of info (the time and the number of logged on users)so the 0:00 is the time and the last number is the number of logged on users. the _ (underscore) is just my delimiting character. The batch file write this info to a text file. I'm trying to figure out a way to grab the highest value per hour. So I need to get the highest number from 0:00 through 0:59, 1:00 through 1:59, etc. The results would be similar to this:
    0 = 0
    1 = 0
    2 = 0
    3 = 0
    4 = 0
    5 = 1
    6 = 1
    7 = 0
    8 = 2
    etc
    below is a the file I'd import
    10_14_2015.txt

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Import Log and find highest for each hour

    With the imported values in column A2 down, enter this in B2 and fill down to extract the hour.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In column D2 enter the values 0 and fill down to 24
    In column E enter this formula and fill down to give the count per hour
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Import Log and find highest for each hour

    Without helper columns, enter this in E2 and fill down (data starts in A2) and values from 0 to 24 in column D starting in D2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 10-15-2015 at 12:02 PM.

  7. #7
    Registered User
    Join Date
    04-01-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Import Log and find highest for each hour

    newdoverman - Thanks for your help, but you've got me lost. I'm not understanding what I need to do.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Import Log and find highest for each hour

    Ok, I was working with your first example. Here is something that will work with your second example
    With the data in column A starting in A2:
    To get the hour enter in B2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To get the number of Users per time enter in C2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In column E starting in E2 enter 0 to 23
    In column F to get the number of Users per hour enter in F2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In column G to get the max number of Users per time enter this in G2 and fill down (ARRAY FORMULA ENTER WITH CTRL+ SHIFT+ENTER)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-01-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Import Log and find highest for each hour

    newdoverman -

    WOW! Thanks... lots to disgust here, but it works!

    Thanks,
    Kevin

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Import Log and find highest for each hour

    Thank you for the feedback. Sorry for taking so long. I was working with the first example and a misconception at the same time.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Find Highest 3x3 Sum
    By daffodil11 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-04-2015, 10:15 PM
  2. Find the highest value in a column
    By maddogwillie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-27-2013, 04:46 PM
  3. Find the highest value below 400
    By FallingDown in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-20-2012, 05:35 AM
  4. VBA code to find highest and 2nd highest number based in criteria
    By Michael007 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-25-2011, 08:38 AM
  5. Find hour in a range of hour values
    By mqdias in forum Excel General
    Replies: 2
    Last Post: 04-11-2011, 05:06 AM
  6. Look up a value and find the highest date associated with it
    By dvent in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2008, 07:56 AM
  7. Replies: 2
    Last Post: 09-19-2008, 10:22 AM

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