We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Excel- how to..? if a cell value (time) is.. then display..

Options
I am doing a log of certain things, time based, and want to highlight some cells depending on the time of day.

eg-
if before 9am, then show x,
9-12pm show y,
12-6pm - z,
etc..

also to change background of the cell (green / yellow / red) for current status?
Long time away from MSE, been dealing real life stuff..
Sometimes seen lurking on the compers forum :-)

Comments

  • googler
    googler Posts: 16,103 Forumite
    Part of the Furniture 10,000 Posts Name Dropper Combo Breaker
    You can change the fill colour of the cell based on its content using Conditional Formatting
  • johnmc
    johnmc Posts: 1,265 Forumite
    Use the HOUR and MINUTE functions with an IF statement.
  • AdamJK_2
    AdamJK_2 Posts: 126 Forumite
    Tenth Anniversary 100 Posts Combo Breaker
    As mentioned, IF function using HOUR and MINUTE is the way forward or maybe a filter for range depending on the application.

    To colour the cell it sounds like you want to use 'conditional formatting'. You can find this under 'tools' on the top menu I think.

    You can set up to three values to display different styles, borders or patterns (background colour) depending on the value of the cell.

    Personally I'd be tempted to use VBA to handle most of what I'm thinking your end result may be. If you need any help then feel free to PM me with what you need or an example and I'll help you sort it - I've got some spare time tomorrow aft and I'm sad enough to actually enjoy playing around with Excel!
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.9K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.9K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.