Advertisement
Danila_lipatov

VLookup_vba

Oct 7th, 2022
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. Sub check()
  2. Dim capital(3) As Variant
  3. capital(0) = "êàïèòàë"
  4. capital(1) = "ðåçåðâ"
  5. capital(2) = "äîñîçä"
  6. capital(3) = "íåäîñîçä"
  7. Dim j As Integer
  8. Dim check As Variant
  9. Count = 0
  10. Dim c As Range
  11. Dim firstAddress As String
  12.  
  13. For i = 2 To 684
  14. find_name = Int(Workbooks(".xlsx").Sheets("Sheet1").Cells(i, 4).Value)
  15. sDescript = Application.VLookup(find_name, Range("B2:J754"), 2, 1)
  16. Debug.Print (VarType(Cells(i, 2).Value))
  17. check = IIf(IsError(sDescript), "", sDescript)
  18. If check = "" Then
  19. check = Cells(i, 12).Value
  20. Count = Count + 1
  21. 'Debug.Print (i)
  22. End If
  23. 'Debug.Print (check & " " & i)
  24. Next i
  25. Debug.Print ("IS" & " " & Count)
  26. End Sub
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement