VB programing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a cross check that will verify if several cells on a WB equal (or is +
/ - 2 units)

also that verify in another workbook also.

can some one help me.
 
sorry i don't understand what you want.
Could you please be more specific and give an example.
Thanks,
Sebastien
 
Dim dblCheck as Double

dblCheck = Abs(Range("A1").Value - Range("B1").Value)
If dblCheck > 2 Then
'Whatever you want to do if they are out of tolerance
End If

Or if they are on different (open) workbooks

dblCheck
Abs(Workbooks("Book1.xls").Sheets("Sheet1").Range("A1").Value
Workbooks("Book2.xls").Sheets("Sheet1").Range("B1").Value)
If dblCheck > 2 Then
'Whatever you want to do if they are out of tolerance
End If

Adapt to fit your circumstances.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top