|
ichinose様の回答をがんばって形にしてみました。
思い通りの動きになりました!!
間違っているところはありませんか??
===================================================================
Sub judgement3()
If Application.CountIf(Range("M2:P2"), "ENG") = Range("M2:P2").Count Then
Range("K2").Value = "ENG"
ElseIf Application.CountIf(Range("M2:P2"), "FRA") + Application.CountIf(Range("M2:P2"), "ENG") = Range("M2:P2").Count Then
Range("K2").Value = "FRA"
ElseIf Application.CountIf(Range("M2:P2"), "ITA") + Application.CountIf(Range("M2:P2"), "ENG") = Range("M2:P2").Count Then
Range("K2").Value = "ITA"
ElseIf Application.CountIf(Range("M2:P2"), "GER") Then
Range("K2").Value = "GER"
ElseIf Application.CountIf(Range("M2:P2"), "ESP") Then
Range("K2").Value = "ESP"
ElseIf Application.CountA(Range("M2:P2")) = Range("M2:P2").Count Then
Range("K2").Value = "JPN"
ElseIf Application.CountA(Range("M2:P2")) Then
Range("K2").Value = "ITA"
End If
End Sub
===================================================================
|
|