简体   繁体   English

条件格式:如果行不是空白,请在excel中突出显示每隔一行?

[英]Conditional Formatting: Highlight every other row in excel if row not blank?

I am using the following conditional format to highlight every other row in a worksheet: 我正在使用以下条件格式来突出显示工作表中的所有其他行:

=MOD(ROW(),2)=1

This also highlights blank rows. 这还将突出显示空白行。 I do not want it to. 我不想要 Please can someone show me where i am going wrong? 请有人能告诉我我要去哪里错吗?

You are done already with half of the part. 您已经完成了一半的工作。 Please add this single conditional formatting formula to complete your task, 请添加此单个条件格式公式以完成您的任务,

=IF(MOD(ROW(),2)=1,IF((1:1=""),FALSE,TRUE))

This formula just validates the presence of blank in every row that you selected. 此公式仅验证所选行中是否存在空白。 Let me know if you need anything else. 需要帮助请叫我。

Apply this format to column A2:A1000 . 将此格式应用于列A2:A1000

=IF($A2<>"",MOD(ROW(),2)=1)

If the cell is not blank then the format will occur. 如果单元格不是空白,则将发生格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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