我開發了一個宏,用於檢查範圍內的值,並根據更改前的值將粗體應用於來自同一行的不同列中的某些值。 這工作正常我很高興abbout得到那個。代碼 的部分是這個vba worksheet_change爲不同工作表中的單元格
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
昏暗KeyCells作爲範圍
Dim valorActual As Long
Dim valorAntic As Long
Set KeyCells = Range("BF3:BF378")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
valorActual = Target.Value
valorAntic = Rows(Target.Row).Columns("BG").Value
If (valorActual > 4 And valorAntic < 5) Or (valorActual > 8 And valorAntic < 9) Or (valorActual > 12 And valorAntic < 13) Or (valorAntic > 4 And valorActual < 5) Or (valorAntic > 8 And valorActual < 9) Or (valorAntic > 12 And valorActual < 13) Then
Rows(Target.Row).Columns("C").Font.Bold = True
Rows(Target.Row).Columns("C").Font.Underline = True
Rows(Target.Row).Columns("R").Font.Bold = True
Rows(Target.Row).Columns("R").Font.Underline = True
End If
的問題是,現在這個工作,因爲它應該,我想從另一個片檢查。 換句話說, 直到現在我唯一要檢查的是列bf。如果有新的價值,我會檢查它。但是在部署的那一刻,我意識到這個列已經改變了,因爲其他工作表中的另一個已經被更改過了。 我的意思是真正的變化是在另一張紙上,而其內部的單元格的列是 「= anotherSheet!thecellchanged」 ,如果這個「另一張紙」發生了變化,原始工作表中的宏就不會改變它
so 是否有辦法檢查影響第三張紙的紙張的變化,並取出=「anothersheet」單元格的範圍? 感謝您的網站,並幫助提前