+ Reply to Thread
Results 1 to 13 of 13

How to fill in blank cells with conditional formatting dependent on another cell

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    How to fill in blank cells with conditional formatting dependent on another cell

    Hi,

    I am trying to shade in the blank cells for each column (B$7:B$66) when the value =18 in cell (B$6).

    Sample attached below. Any help would be greatly appreciated.

    Thank you.

    Rowena
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    Conditional Formatting

    Select B7:B66

    CF formula

    =AND($B$6=18,$B7="")

    Fill ...Black

    OK
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    Hi Rowena229,

    If you select all cells from B6:DS66 go into conditional formatting, choose "use a formula to determine which cells to format" and type in the following formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Choose your format and voila

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    =IF(AND(B$6=18,B7=""),1,"")
    Farley - this is not a formula that will work in CF. A CF formula must return TRUE or FALSE.

    See post #2 above yours for the correct approach.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    Hi Ali,

    I wrote the formula in CF to test before posting, it works.

    But re-reading the OP I don't know if it will work how Rowena wants it to because it will look at each column, row 6 for the number 18 then shade in each blank one underneath. (If the CF is pasted across the whole range.)

    Whereas JohnTopley's shades the whole row based on the 18 in column B.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    I am surprised, and suspect it isn't actually working as you think it is.

    To reiterate: a CF formula rule will need to evaluate to TRUE or FALSE in order to work correctly.

  7. #7
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    I always use IF formula's in CF

    From the sounds of it CF must work the same way as an IF formula because IF B$6 = 18 and the cell B7 (B7 will be dynamic when copied and pasted) is blank. Value 1 if not blank.

    It will return either true or false for each cell

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    ... does it ??
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    BOTH rules work.

    If you put my rule in a cell, you will get a TRUE/FALSE condition: hence as Ali said, the IF condition is redundant in this case.
    Last edited by JohnTopley; 09-23-2021 at 11:44 AM.

  10. #10
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    It's done the same as yours but not the whole row. Like I said might not be what the OP wants but for every 18 in row 6 it will fill the blank cells in that column.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    03-17-2010
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    i think this is smilat to farley =IF(B$6=18,IF($B7="",1))=1

  12. #12
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    Thank you! It works!

    Quote Originally Posted by JohnTopley View Post
    Conditional Formatting

    Select B7:B66

    CF formula

    =AND($B$6=18,$B7="")

    Fill ...Black

    OK

  13. #13
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: How to fill in blank cells with conditional formatting dependent on another cell

    Thank you! This works too!

    Quote Originally Posted by Farley945 View Post
    Hi Rowena229,

    If you select all cells from B6:DS66 go into conditional formatting, choose "use a formula to determine which cells to format" and type in the following formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Choose your format and voila

+ 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. [SOLVED] Conditional formatting - fill range if all cells in range are not blank
    By Kathi_TheTrueOne in forum Outlook Formatting & Functions
    Replies: 3
    Last Post: 02-24-2021, 07:24 PM
  2. conditional formatting for blank cells dependent on due dates
    By Brandi_____ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-19-2017, 02:17 PM
  3. Fill color of cells with conditional formatting for more than 3 criterias
    By Sai Prashanth in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2014, 03:58 PM
  4. [SOLVED] Conditional Formatting: Red fill for cells A1 through Y192 on row number in cell value
    By nenadmail in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2014, 08:00 AM
  5. Conditional Formatting - Blank cell fill problem....
    By LDouble3 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-06-2012, 09:35 AM
  6. Cell Formatting Conditional On Other Cells Fill Color?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2006, 12:25 PM

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