Hi hommer,
Please find the attached file. Hope this will help you to solve your problem.
Please find the below snapshot of the code I have used in this attached file.
Sub test1()
Dim i As Integer
Dim arrCountry(10) As String
Dim arrCurrency(10) As String
j = 2
arrCountry(0) = "United State"
arrCountry(1) = "Sweden"
arrCountry(2) = "Hong Kong"
arrCurrency(0) = "USD"
arrCurrency(1) = "SEK"
arrCurrency(2) = "HKD"
For i = LBound(arrCountry) To UBound(arrCountry)
If arrCountry(i) = "" Then
Exit Sub
End If
Country = arrCountry(i)
If Country = ActiveSheet.Range("A" & j).Value Then
ActiveSheet.Range("B" & j).Value = arrCurrency(i)
End If
j = j + 1
Next
End Sub
Regards,
Daksh
Bookmarks