Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 9th, 2012  |  syntax: None  |  size: 0.68 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. vba-excel meaning of <> (angled brackets or greater-than and less-than symbols)
  2. Sub exampleFindReplace()
  3.  
  4. With Worksheets(1).Range("a1:a500")
  5. Set c = .Find(2, LookIn:=xlValues)
  6. If Not c Is Nothing Then
  7.     firstAddress = c.Address
  8.     Do
  9.         c.Value = 5
  10.         Set c = .FindNext(c)
  11.     Loop While Not c Is Nothing And c.Address <> firstAddress
  12. End If
  13. End With
  14.  
  15. End Sub
  16.        
  17. Sub exampleFindReplace()
  18.  
  19. With Worksheets(1).Range("a1:a500")
  20. Set c = .Find(2, LookIn:=xlValues)
  21. If Not c Is Nothing Then
  22.     firstAddress = c.Address
  23.     Do
  24.         c.Value = 5
  25.         Set c = .FindNext(c)
  26.         If c Is Nothing Then Exit Do
  27.     Loop While c.Address <> firstAddress
  28. End If
  29. End With
  30.  
  31. End Sub