简体   繁体   中英

Is there a way in excel to apply a formula based conditional format for an entire column?

So I have these columns: 在此处输入图片说明

And what I would like to have each cell under the "Completed Date" column change color according to whether the date is before or after the due date or if it's blank. I'd like to do it in a way where I don't have to set the conditions for each cell individually but rather in a sort of "drag through" way, like when you use a formula, and you drag that formula down, it applies to each adjacent cell on the way down. Any assistance with this would be most appreciated. Thanks!!

As @cybernetic.nomad says, get it right for the top-left cell and the rest will follow. For example, if you want to highlight where the completion date is after the due date, put

=AND(ISODD(COLUMN()),B2>A2)

as a custom formula.

在此处输入图片说明

You will need separate rules to highlight blanks and completion dates equal to or before before the due date.

What happens if your range starts in column A, so there is no column before it? A strange quirk of conditional formatting is that it allows you to wrap it around to the very last column (XFD), so in this case your formula would look like this:

=AND(ISEVEN(COLUMN()),A2>XFD2)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM