Serge_Bliznykov, Вы генийSerge_Bliznykov писал(а):не буду утверждать что прав...

все отлично, ничего больше не спрашивает ))
Спасибо!
Модератор: Naeel Maqsudov
Serge_Bliznykov, Вы генийSerge_Bliznykov писал(а):не буду утверждать что прав...
Да вообще, конечно не обязательно, как то я сразу не подумала, что быстрее будет сделать по количеству заполненных строкVictorM писал(а):Нужно ли процедуре Yes_Localization задавать жестко 1500 строк?
Код: Выделить всё
Case ""
ActiveCell.Offset(0, 3).FormulaR1C1 = "=VLOOKUP(RC[-3],Localizations!R3C1:R1000C6,5,FALSE)"
Код: Выделить всё
Sub Yes_Localization
O_H = "On Hold"
For n = 3 To 1500
Range("S" & n).Activate
If Range("R" & n) = "" Then
ActiveCell.FormulaR1C1 = ""
Selection.Interior.ColorIndex = xlNone
ElseIf Range("R" & n) = O_H Then
ActiveCell.FormulaR1C1 = ""
Selection.Interior.ColorIndex = xlNone
Else: ActiveCell.FormulaR1C1 = "Yes"
ActiveCell.Interior.ColorIndex = Range("S2").Interior.ColorIndex
End If
Next
Range("A2").Select
End Sub
Код: Выделить всё
Sub Yes_Localization()
Dim i As Long
O_H = "On Hold"
For i = 3 To Range("B65536").End(xlUp).Row
If IsEmpty(Cells(i, "R")) Then
Cells(i, "S") = ""
Cells(i, "S").Interior.ColorIndex = xlNone
ElseIf IsEmpty(Cells(i, "R")) And IsEmpty(Cells(i, "H")) Then
Cells(i, "S") = "Tentative"
Cells(i, "S").Interior.ColorIndex = 3
Cells(i, "S").Font.Bold = True
ElseIf Cells(i, "R") = O_H Then
Cells(i, "S") = ""
Cells(i, "S").Interior.ColorIndex = xlNone
Else: Cells(i, "S") = "Yes"
Cells(i, "S").Interior.ColorIndex = Range("S2").Interior.ColorIndex
End If
Next
End Sub