+ Reply to Thread
Results 1 to 3 of 3

Mark events that occurred within specified time of another event with same name

  1. #1
    Registered User
    Join Date
    05-05-2010
    Location
    PA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Mark events that occurred within specified time of another event with same name

    Hello and thanks for reading!

    I am looking for a way to assign “chargeable” or “nonchargeable” to a rows on a worksheet based on how close (in hours) one event happened in relation to another matching event, in this case within 2 hours.

    For example, If row 1 represents an event named "Setup" and has a time value of 1:00 and subsequent rows with events "Setup" and "Setup" both have a time value of 1:30, I would like to assign a specific value to the first instance of "Setup" to indicate it is chargeable and another value to the second and third instance to indicate they are unchargeable. If later on, a fourth "Setup" event is entered with a time value outside of the 2 hour range of any of the others, then it would be chargeable.

    So the output would like something like this.


    Event -- Time -- Billable Status
    SetUp -- 1:00 -- Chargeable
    SetUP -- 1:30 -- NonChargeable
    SetUp -- 1:30 -- NonChargeable
    SetUp -- 4:30 -- Chargeable


    Essentially, the requirement is that a service cannot be billed if it happened within 2 hours of the administration of the same service.

    Let me know if that makes any sense and thanks for reading and helping!
    Last edited by phildetwei; 05-05-2010 at 07:09 PM.

  2. #2
    Registered User
    Join Date
    04-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Mark events that occurred within specified time of another event with same name

    Just fiddling, I have half of a solution. If you can figure out how to utilize time in formulas, this ought to work. I set up a small table where column A is the time of day (I did it in decimal format though...4:30 PM would look like 16.50) and B was chargeable/not chargeable.

    In column B:
    =IF(A2>A1+2,"Chargable","Not Chargeable")

    Hope that at least gets you a step closer. Like I said, if you can get the formula to add 2 hours instead of just 2 units, you can keep your normal time. I tried a few things, but I am fairly green myself.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Mark events that occurred within specified time of another event with same name

    Post up a sample workbook and it makes it far simpler for people to test their ideas.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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