+ Reply to Thread
Results 1 to 12 of 12

Conditional formatting

  1. #1
    Registered User
    Join Date
    03-20-2013
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Angry Conditional formatting

    Good morning!

    I'm working on a very primitive version of a bed board. I want Excel to do the following:

    If any cell in B7:F7(b through f represent the days of the week)= 0 (zero means no available beds),
    then default all cells to 0.

    Otherwise, sum discharges+transfers+intakes for each day(ex. b4:b6, c4:c6, etc.)

    Here's what I have so far (I suck at this so bear with me):

    =(IF(OR(B7:F7=0),0,SUM(B4:B6)))

    Thanks and have a great day!

    Cara

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Conditional formatting

    Hi squic657,

    Welcome to the forum

    Not seem to be a conditional formatting question

    Please attach a sample workbook with dummy data by covering the expected output for better understanding

    Refer my signature area to know about how to attach file.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional formatting

    HI Cara,

    welcome to the forum.
    Can you upload a sample workbook.. ? thx



    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  4. #4
    Registered User
    Join Date
    03-20-2013
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Post Re: Conditional formatting

    Admissions Excel Formulas.xlsx

    Good morning folks,

    Here's the attachment for the question that's troubling me. The only reason I believe this question relates to conditional formatting is because of the "if, then" logic involved:

    IF x5=0, THEN make all PREVIOUS x's in the series 0.

    DILIPandey and Sixthsense: I hope this helps you better understand the question I have. Thanks for such a prompt response yesterday morning! You gentlemen are the Best!

    Cara

  5. #5
    Registered User
    Join Date
    03-06-2013
    Location
    Prague
    MS-Off Ver
    M365, version 2304
    Posts
    40

    Re: Conditional formatting

    Hey

    Hopefully I've understood what you're looking for, but try

    =IF(B7=0,0,SUM(B3+B5+B6))

    in B8 and drag across to fill the other cells.

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional formatting

    Hi Cara,

    conditional formatting can not make any cell zero. It is used just for formatting (bold / italic / color etc).
    also for
    IF x5=0, THEN make all PREVIOUS x's in the series 0.
    , X5 here itself is sum of previous Xs... so not sure what you need.


    Regards,
    DILIPandey
    <click on below * if this helps>

  7. #7
    Registered User
    Join Date
    03-20-2013
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Smile Re: Conditional formatting

    Thanks Hypex! You understood what I was looking to do. That's where I got stuck.

    Cara

  8. #8
    Registered User
    Join Date
    03-20-2013
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Conditional formatting

    DILIPandey, it's cool. I don't think what I want can be done in Excel. Thanks again!

  9. #9
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Conditional formatting

    Hi Cara, please mark this thread as [SOLVED], if your query stands resolved.. thx



    Regards,
    DILIPandey
    <click on below * if this helps>

  10. #10
    Forum Contributor
    Join Date
    08-22-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2003
    Posts
    129

    Re: Conditional formatting

    It can't be done with formula without creating a circular reference (infinite loop of checking if 0, if so make it 0, check again, make 0 again... etc)

    It can be done using VBA Code though:

    Please Login or Register  to view this content.
    But I fear I've caused an infinite loop here too and not sure how to end it after the initial check... Can someone better with VBA than me please fix it? Hehe.

    (Note you can use this one if you just hit the Escape key after a few seconds, so the code ends after only doing a few loops, everything will be 0. But I'm sure it's an easy fix to remove the infinite loop.)

  11. #11
    Registered User
    Join Date
    03-20-2013
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Conditional formatting

    Will do! Thanks again for your help!

  12. #12
    Registered User
    Join Date
    03-20-2013
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Conditional formatting

    Thanks ThomasCarter! I can't wait to try it.

    Cara
    Last edited by squic657; 03-23-2013 at 06:45 PM. Reason: wanted to give credit where it was due.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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