【发布时间】:2015-12-11 00:58:56
【问题描述】:
【问题讨论】:
-
比较后你想做什么?
-
突出差异
标签: excel excel-formula formula vba
【问题讨论】:
标签: excel excel-formula formula vba
使用行差异。
Sub SelectDiffRws()
Dim Rws As Long, Rng As Range, rng2 As Range, c As Range
Rws = Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = Range(Cells(2, 1), Cells(Rws, 2))
Set rng2 = Rng.RowDifferences(Range("A2"))
Columns("A:B").Interior.Color = xlNone
For Each c In rng2.Cells
Range(Cells(c.Row, 1), Cells(c.Row, 2)).Interior.ColorIndex = 3
Next c
End Sub
例如看这里 http://www.xlorate.com/vba-examples.html#Column%20Differences
请看这里的剪辑 https://youtu.be/Fcq4rgigu3w
sample workbook的可共享链接
【讨论】: