简体   繁体   English

如果一行上的两个单元格都相等,如何为行着色

[英]How to color row if two cells on a row both equal complete

trying to, if Range("G2").value & Range("H2").value = "Complete" Then do this.尝试,如果 Range("G2").value & Range("H2").value = "Complete" 然后这样做。

   If (Range("G2").Value & Range("h2").Value) = "Complete" Then
    Range("a2:j2").Interior.ColorIndex = 6
else
    End If

& is used for String concatenation; &用于字符串连接; you are looking for the logical operator And .您正在寻找逻辑运算符And

If Range("G2").Value = "Complete" And Range("H2").Value = "Complete" Then

暂无
暂无

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

相关问题 如何验证两个单元格是否相等,如果不相等,请在上面空一行并继续前进? - How to verify if two cells are equal and, if not, make an empty row above and move on? 如何检查一行中的单元格是否等于其他工作表中的另一行 - How to check if cells in a row are equal to another row in other sheet 比较ell A3和A2,如果相等,则不对第3单元格A到F上色。对下一行重复 - Compare ells A3 and A2, if equal, nothing else color row 3 cells A though F. Repeat with next row Excel:如何使一行中的每个单元格等于一行中的其他单元格,但跳跃 2 个单元格而不是 1 个? - Excel: how to make each cell of a row equal to other cells of a row but jumping by 2 cells instead of 1? 如何在excel中减去x行的两个单元格 - How to substract two cells of x row on excel 如果单元格等于一组值,则删除行 - Delete row if cells equal a set of values 是否可以基于另一列/单元格对单元格的行/列进行着色? - Is it Possible to Color a Column/Row of Cells based on another Column/Row of Cells? 如何根据值的频率对行中的单元格进行颜色编码? - How to color code cells in a row based on frequency of values? 根据列标题和行标题解锁单元格? - Unlock cells based on both column and row headers? 如果 A 列中的单元格与其他工作簿上 A 列中的单元格相同,则复制该行 - If Cells in column A equal cells in column A on other workbook copy that row
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM