Too many line continuations

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
567
Office Version
  1. 365
Platform
  1. Windows
I recorded a macro to filter the state indicator "IL" in a worksheet (4000 rows) (Column J). I need to then filter another column (N) within the "IL" for "HMO" When I tried recording the macro I got 400 "IL" rows and the macro stopped recording and the error message was "Too many line continuations"

This amount of 'IL" will vary from day to day. What can I use for the filter (IL) then filter (HMO) option in my macro?

Any help will be appreciated.
James
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
If the number of rows in Column W is variable, try something like the following:

Code:
[COLOR=#333333]Range("$A$1:$W$" & Range("W" & Rows.Count).End(xlUp).Row)[/COLOR]
 
Last edited:
Upvote 0
I got it with this below:

Dim rngFiltCol As Range

ActiveSheet.Range("A:W").AutoFilter field:=14, Criteria1:="=HM*", _
Operator:=xlAnd

With ActiveSheet.AutoFilter.Range
Set rngFiltCol = .Resize(.Rows.Count, 1) _
.Cells.SpecialCells(xlCellTypeVisible)
If rngFiltCol.Cells.Count = 1 Then
MsgBox "NO DATA"
Else

End If
End With
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,472
Members
449,087
Latest member
RExcelSearch

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top