[英]Excel: How to copy/paste Conditional Formatting, as if the condition were a “value”?
正如Brad Dixon所說,VBA是唯一的解決方案。
Public Sub HighlightColumn()
Dim tbl As ListObject
Dim wsCell As Range
Dim rw As Range
'loop through each row
Set tbl = ActiveSheet.ListObjects("Table_1") 'my data is inside a table
For Each rw In tbl.Range.SpecialCells(xlCellTypeVisible).Rows
Set wsCell = rw.Cells(1, 17)
If rw.Cells(1, 18) = "*" Then
With wsCell
.Interior.Color = vbYellow
End With
End If
Next rw
'the golden moment!
tbl.Range(, 18).EntireColumn.Delete
End Sub
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.