Help condensing 2 step process
Hi,
Am Tue, 21 Feb 2017 00:06:39 -0800 (PST) schrieb Living the Dream:
I managed to do this in a 2 part code, but was hoping to condense it into 1. Here is my original 2 step process:
The following stored the equated/evaluated value in a cell ( which I am trying to avoid ).
Sub Get_Weight()
End Sub
Then I ran the following to highlight those rows(Column Ranged) that met the criteria, which work quite well.
Sub Check_Weight()
End Sub
try:
Sub Check_Weight()
Dim tSht As Worksheet
Dim tRng As Range, c As Range
Const wgt = 1136
Set tSht = Sheets("TMS DATA")
Set tRng = tSht.Range("O6:O350")
For Each c In tRng
If c.Offset(, -14) < 0 Then
With c
.Offset(, 37).Value = (c.Value / c.Offset(, -1).Value)
If .Offset(, 37) wgt Then _
.Offset(, -14).Resize(1, 31).Interior.ColorIndex = 0
End With
End If
Next c
End Sub
Regards
Claus B.
--
Windows10
Office 2016
|