+ Reply to Thread
Results 1 to 8 of 8

Conditional format

  1. #1
    Registered User
    Join Date
    03-15-2014
    Location
    Lima, Peru
    MS-Off Ver
    Excel 2010
    Posts
    4

    Conditional format

    Hey guys I have this issue,

    I have a columm that is suposed to have only time values (format= hh:mm) and it must be filled with that format.

    Nevertheless, sometimes when my assistants fill the columm they insert the values as (for eg.) 10.45 instead of 10:45 which changes the cell format and will give me a wrong result in another cell.

    What I was wondering is if it is possible to make a conditional format which warns me (with a color change for instance) when the cell format is changed.
    I have a very large list and It would spare me a great amount of time checking if there is any value with "." instead of ":"

    I hope I've made myself clear.

    Cheers.

    DS

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,650

    Re: Conditional format

    Assuming the time you enter is <=24:00

    Conditional formating/Use a formula...:

    =A1>1

    will marks cell A1 if the value is not the time format
    Quang PT

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional format

    try this conditional format
    =NOT(OR(A1="",AND(CELL("format",A1)>="D6",CELL("format",A1)<="D9")))
    so if someone enters 00:45 or 10:45 its fine if they enter 0.45 or 10.45 the cell will change colour
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    03-15-2014
    Location
    Lima, Peru
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional format

    Quote Originally Posted by martindwilson View Post
    try this conditional format
    =NOT(OR(A1="",AND(CELL("format",A1)>="D6",CELL("format",A1)<="D9")))
    so if someone enters 00:45 or 10:45 its fine if they enter 0.45 or 10.45 the cell will change colour
    Thanks for the help. Sorry for not getting it right but when you mean D6 and D9 is it suppose to mean true and false on the conditional formating? And A1 I assume would be the cell I want to apply the formatting.

    Thanks once again.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Conditional format

    "D6" and "D9" are cell formats, not references to cell D6 or D9. "D9" represents time format.

    Another approach to this would be to prevent the error in the 1sy place (wont fix the current errors though)

    You could do this by applying Data Validation to those cells, the the rule shown below, this will allow only time format to be entered.

    Highlight the range, select Data Validation from the data Tab
    select Custom from the Allow drop-down
    Formula =CELL("format",A1)="D9"
    test to make sure it's working
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    03-15-2014
    Location
    Lima, Peru
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional format

    Man, problem solved!

    Thanks a lot! Didnt know about this website but surely I'll come and visit again.

    Cheers!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Conditional format

    happy to help and look forward to seeing you around here again soon

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  8. #8
    Registered User
    Join Date
    03-15-2014
    Location
    Lima, Peru
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional format

    Done!

    Cya later

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 05-15-2013, 12:16 AM
  2. [SOLVED] Copy Conditional Format only without over writing existing format
    By RobNorwichUK in forum Excel General
    Replies: 2
    Last Post: 01-22-2013, 12:20 PM
  3. Replies: 2
    Last Post: 09-26-2012, 04:43 AM
  4. Replies: 0
    Last Post: 05-20-2011, 02:33 PM
  5. Replies: 6
    Last Post: 08-02-2010, 04:05 PM

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