+ Reply to Thread
Results 1 to 8 of 8

IF function

  1. #1
    Registered User
    Join Date
    06-20-2008
    Posts
    52

    Question IF function

    Hello,
    Please help me write an IFformula:

    Cell B1 must equal A1. If not, return a red border around cell B1.

    Thank you in advance.

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: IF function

    that would be done with conditional formating, use the formula

    =B1<>A1

    in your conditional format, then set a red border.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Registered User
    Join Date
    06-20-2008
    Posts
    52

    Re: IF function

    Sorry the solution did not work. I've attached a sample spreadsheet. Thank you.
    Attached Files Attached Files

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: IF function

    What cells are you trying to compare? Cell A1 = "Pay Period" and Cell B1 = "Start" as these are text, i don't suspect this is the cells you meant.

  5. #5
    Registered User
    Join Date
    06-20-2008
    Posts
    52

    Re: IF function

    in the attached spreadsheet I am trying to compare total hours worked and total hours paid.

    shade total hours paid red if it does not equal total hours worked

    thank you

  6. #6
    Registered User
    Join Date
    03-22-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: IF function

    Alright, I went ahead and did the conditional formatting.

    All you have to do in the real version is add a conditional formatting rule to the "total hours paid" cells using the rule type "Use a formula to determine which cells to format". Then use the formula "= (total hours paid cell) <> (total hours worked cell)" ie... =V8<>I8. Then set the format to a red border, red highlight, or whatever you want when the result is true.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-20-2008
    Posts
    52

    Re: IF function

    Thank you this worked

  8. #8
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: IF function

    no problem,

    could you please mark this thread as solved? To do so, go to thread options at the top, and select mark as solved.

+ 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