Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Too Many Line continuations | Excel Discussion (Misc queries) | |||
Macro code to put series name next to individual line in line grap | Charts and Charting in Excel | |||
How to convert a dotted line to a solid line in a line graph | Charts and Charting in Excel | |||
Macro problem on, Yellowed line - previous line or next line. | Excel Programming | |||
Macro convert CSV -to- XLS without parsing line by line | Excel Programming |