Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel 2010 - Assign Text Label determined by Current Hour of Day

Posted on 2014-01-20
4
Medium Priority
?
423 Views
Last Modified: 2014-01-20
Wish to assign cell text value to describe work shift based on current Hour of day.

example:

If Hour >= 0700 and Hour <= 1500
    then "Days"
else if Hour >= 1500 and Hour <= 2300
    then "Swing"
else if Hour >= 2300 and Hour <= 0700
    then "Nights"
0
Comment
Question by:dlpotlatch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:tmx84
ID: 39795436
I'm guessing your basing this off of a start time?  What exactly does the cell have in it that you are trying to base this off of?
0
 

Author Comment

by:dlpotlatch
ID: 39795468
Not based off a start time.  Just need to look at the value of Hour for the current time.  For example record entered in the sheet where the current value of Hour is between 0700 and 1500 would get the value Days in the cell.
0
 
LVL 4

Accepted Solution

by:
tmx84 earned 2000 total points
ID: 39795471
How is the cell getting the current hour of day?

So.. if A1 contains "current hour of day", something like this would work...

=IF(AND(A1>=700,A1<=1500),"Days",IF(AND(A1>=1500,A1<=2300),"Swing","Nights"))

it basically just figures out if it's between 700-1500 it's Days, 1500-2300 is Swing, and anything outside of those two is Nights...
0
 

Author Comment

by:dlpotlatch
ID: 39795543
That works, thanks much.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question