I'm a newbie to macro editing (though I do know basic VB) and am trying to create a macro which takes each cell in row B in a sheet from row 26 to 11230 and test if there are less than two spaces in the text of that cell (less than three words). If there's only one or zero spaces, the cell should be made invisible by making the text color white. Also, if the cell contains either "/" or "," or "&" somewhere in the text, the cell should NOT be whited out, even though there's less than three words. Finally, some cells may contain a space in the end of the text, why that last character is best not checked at all (the important thing is that no unsure cells are whited out). The main problem is how I convert numbers and strings into the irritating type Range, which is how I try to check all cells from X to Y. Here's my failing code, beware of stupid variable names...

VB Code:
  1. Sub Makro4()
  2. '
  3. ' Makro4 Makro
  4. ' Makrot inspelat 2005-12-30 av Joel
  5. '
  6.  
  7. '
  8.     addd = 26
  9.     byp = "B"
  10.     While (addd < 11230)
  11.    
  12.     gtt = byp + addd
  13.    
  14.     sirr = Range(gtt).Value
  15.     numm = 1
  16.     countt = 0
  17.     While (numm < Len(sirr))
  18.         charr = Mid(sirr, numm, 1)
  19.         If (charr = " ") Then
  20.             countt = countt + 1
  21.         End If
  22.         If (charr = "/" Or charr = "&" Or charr = ",") Then
  23.             numm = 99
  24.         End If
  25.         numm = numm + 1
  26.     Wend
  27.     If (countt < 2 And Not (numm = 100)) Then
  28.         Range("B" + addd).Select
  29.         Selection.Font.ColorIndex = 2
  30.     End If
  31.     addd = addd + 1
  32.    
  33.     Wend
  34. End Sub

Variable declarations:

VB Code:
  1. Dim gtt As Range
  2. Dim addd As Integer
  3. Dim sirr As String
  4. Dim charr As String
  5. Dim numm As Integer
  6. Dim countt As Integer
  7. Dim byp As Range

Thanks for your help!