Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Time

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    Washington State, USA
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi

    Thanks to all who have helped me so far.

    I have labels that are on a userform that will report the average of 60 minutes of data. I have 24 cells that I want to pull the data from.

    What I hope some one will tell me is how to I set up a way of getting the right data for the right hour?

    The first hour will be from 00:00 to 01:00.
    I want the data drom A1. After 01:00 up until 02:00, I want the data from cell A2.

    Can this be done in a way that a rookie like me can understand?

    Thank you for your time,

    Jim


  2. #2
    Board Regular
    Join Date
    Apr 2002
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Do you know VB or are you familiar with VBE?

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    Washington State, USA
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm familiar with the VBE, but I don't know how to write VB. for the most part I record macros and hack them up pretty bad. And I can usually stumble through putting code where it works any way.

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Jim
    Is the crieria based upon the current time?
    In any case, it seems that the Select Case Statement might be the best way to go...
    If you only need the data from one cell you could also try this, assuming the hour is the current hour...

    lblYourLabel.Caption = _
    Sheet1.Range("A" & Hour(Now) + 1).Value

    Tom


  5. #5
    Board Regular
    Join Date
    Apr 2002
    Location
    Washington State, USA
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks alot Tom. I never thought of that.

    Jim

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •