macro

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I need help............
I am trying to get a macro to for the following problem:

there are 4 lines of information spanning from ("A9:AG12"). Columns A
through AF are properties from a test. Each row is a seperate test. Column
AF is the date.

If any two consecutive tests are outside the specific tolorance then the
production of the material must stop unless the date("AF") is different.
 
For RowCount = 9 To 11
If Range("AF" & RowCount) = Range("AF" & (RowCount + 1)) Then
For ColCount = 1 To Range("AE" & RowCount).Address
If ((Cells(RowCount, ColCount) > MaxTol) Or _
(Cells(RowCount, ColCount) < MinTol)) And _
((Cells(RowCount + 1, ColCount) > MaxTol) Or _
(Cells(RowCount + 1, ColCount) < MinTol)) Then

MsgBox ("Data is out of Range")
End If
Next ColCount
End If

Next RowCount
 

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