View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mkingsley[_3_] mkingsley[_3_] is offline
external usenet poster
 
Posts: 1
Default Too Many Line continuations?? VB Macro


I have a 10,000 line worksheet that I have constructed a macro for an
it works great. I had another request to create another one lookin
for different data. My original had this as a query component (lookin
for sales reps):

Dim i As Long
Dim iStart As Long
Dim iEnd As Long

iStart = 1
iEnd = Range("B65536").End(xlUp).Row

For i = iStart To iEnd
If Range("B" & i).Value < "Claude Mossian" And _
Range("B" & i).Value < "Craig Kowal" And _
Range("B" & i).Value < "Dave Wester" And _
Range("B" & i).Value < "David Stone" And _
Range("B" & i).Value < "Elaine Ober" And _
Range("B" & i).Value < "House Account INDiana" And _
Range("B" & i).Value < "House Account Indiana Lab" And _
Range("B" & i).Value < "Jill Campbell" And _
Range("B" & i).Value < "Lana Compo" And _
Range("B" & i).Value < "Steve Horvath" Then
Range("B" & i).Value = ""
End If
Next

the new data criteria are numbers, so I modified the old macro an
entered it like this:

Dim i As Long
Dim iStart As Long
Dim iEnd As Long

iStart = 1
iEnd = Range("C65536").End(xlUp).Row

For i = iStart To iEnd
If Range("C" & i).Value < "21012" And _
Range("C" & i).Value < "21056" And _
Range("C" & i).Value < "22053" And _
Range("C" & i).Value < "23801" And _
Range("C" & i).Value < "24028" And _
Range("C" & i).Value < "24087" And _
Range("C" & i).Value < "24091" And _
Range("C" & i).Value < "24095" And _
Range("C" & i).Value < "24114" And _
Range("C" & i).Value < "24189" And _
Range("C" & i).Value < "25233" And _
Range("C" & i).Value < "25316" And _
Range("C" & i).Value < "30402" And _
Range("C" & i).Value < "34209" And _
Range("C" & i).Value < "38417" And _
Range("C" & i).Value < "38820" And _
Range("C" & i).Value < "39206" And _
Range("C" & i).Value < "39802" And _
Range("C" & i).Value < "39803" And _
Range("C" & i).Value < "39856" And _
Range("C" & i).Value < "42022" And _
Range("C" & i).Value < "45894" And _
Range("C" & i).Value < "69428" And _
Range("C" & i).Value < "70393" And _
Range("C" & i).Value < "331961" Then
Range("C" & i).Value = ""
End If
Next

I have 40 customer numbers to query, but now every time I try to ad
another line, I get "too many line continuations"

Any help is appreciated.

Mike Kingsle

--
mkingsle
-----------------------------------------------------------------------
mkingsley's Profile: http://www.excelforum.com/member.php...nfo&userid=429
View this thread: http://www.excelforum.com/showthread.php?threadid=37774