Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Meenachi Suppiah   on Aug 24 In MS Office Category.

  
Question Answered By: Isaac Evans   on Aug 24

Here is the code that can help you.

*****************************************************************
Sub CompararCeldasLibros()
Dim numero As Double
Workbooks("AfiliadosxEdadAfiliacion_Sexo04.xls").Activate
numero = Round(ActiveCell.Value, 4)
Workbooks("AfiliadosMujeres.xls").Activate
'Debug.Print "Numero:" & numero
'Debug.Print "ActiveCell:" & Round(ActiveCell.Value, 4)
If Round(ActiveCell.Value, 4) = numero Then
ActiveCell.Interior.Color = RGB(255, 255, 0)
Else
ActiveCell.Interior.Color = RGB(255, 0, 0)
End If
End Sub
*****************************************************************

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Using excel VBA to change a cell color Or get search suggestion and latest updates.


Tagged: