
With Sheets(F2)
Set x = tab2.Find(cella.Value, LookAt:=xlWhole)
If Not (x) Is Nothing And cella.Value <> "" Then
trovato = True
If cella.Offset(0, 11).Value <> .Cells(x.Row, 11) Then
cella.Offset(0, 13) = "VERIFICARE"
cella.Offset(0, 14) = .Cells(x.Row, 10) - cella.Offset(0, 9) ' colli
cella.Offset(0, 15) = .Cells(x.Row, 11) - cella.Offset(0, 10) ' peso
cella.Offset(0, 16) = .Cells(x.Row, 12) - cella.Offset(0, 11) ' prezzo
cella.Offset(0, 17) = cella.Offset(0, 11).Value / cella.Offset(0, 10).Value ' tariffa al kg.
Else
cella.Offset(0, 13) = "OK"
End If
If .Cells(x.Row, 12) - cella.Offset(0, 11) = 0 Then
cella.Offset(0, 13) = "OK"
End If
End If |
Sub Find_Bold_Cat()
Dim lCount As Long
Dim rFoundCell As Range
Set rFoundCell = Range("A1")
For lCount = 1 To WorksheetFunction.CountIf(Columns(1), "Cat")
Set rFoundCell = Columns(1).Find(What:="Cat", After:=rFoundCell, _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
With rFoundCell
.ClearComments
.AddComment Text:="Cat lives here"
End With
Next lCount
End Sub |
