+ Reply to Thread
Results 1 to 2 of 2

setting an set number of 41 and having it reset to 0 once 41 is reached

  1. #1
    Registered User
    Join Date
    05-13-2011
    Location
    fort bragg
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question setting an set number of 41 and having it reset to 0 once 41 is reached



    Ok so i have a spreadsheet that i need to have a set number of 41, and what i want to have happen when it reaches 41 is to reset back to 0. but the key is to having the doc use a calander to include weekends and weekdays, if a varible is set to have duty during the week not to have duty on the weekends, and vice versa so there is no overlapping. now the formula I am trying to use is
    Please Login or Register  to view this content.

    Now i have color coding on the cells that are at or near 21, turning them from while shading to red and when the cel reaches 41 being a sharp red, but i cant get it to reset back to 0 at the begining of the month so people dont get screwed. Also how do i set a flag next to the cell that is at 21, paramaters are 0-15 green, 16-31 yellow, 32-41 red at cell A1

    If anyone could please help me with this.. I will love you long time, and many thanks in advance for helping.
    [INDENT] I'm thinking like a Liberty Basic programmer on this and the function that i do believe it would be is a for loop with a reset condition with in the function:

    Please Login or Register  to view this content.
    then putting a break in there and an excption to catch it at 21 then reset it back to 0. but excell is a little different. >.>


  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: setting an set number of 41 and having it reset to 0 once 41 is reached

    You can probably do this with a Worksheet Change event.

    You need to post a sample workbook and explain which cell is being changed and how that happens.
    When it gets to 41 set it back to 0 isn't very helpful. What is "it"? Which cell? Is it a formula? What does it depend on?

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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