Using Autofilter To Select A Series Of Rows

Aug 24, 2004

I intend to create reports from a master sheet.

The master sheet contains company information; each row represents a (company)record.

The first column contains the country code where the company resides, e.g. DE.

I dug up this piece of

For i = 12 To 1 Step -1
Set rngAutoFilter = Cells(1, i)
rngAutoFilter.AutoFilter Field:=1, Criteria1:="DE"
Range(rngAutoFilter, rngAutoFilter.End(xlDown)).SpecialCells(xlCellTypeVisible).Copy _
Destination:=Worksheets("Sheet2").Cells(1, i)
rngAutoFilter.AutoFilter
Next i

I found this code to work allright but, it only copies the singel cells containing "DE" and the topfirst row. At least that is what is the visible result.

How do I modify this code to copy EACH complete row containing "DE" in the first column?

View 9 Replies


ADVERTISEMENT

Select Range In VBA For Autofilter?

Sep 4, 2012

I've recorded an Excel macro to AutoFilter a selection and set criteria. This will work fine for this set of data but the number of rows will vary from month to month.

How can I modify this macro so that the range will automatically recognize changes in row length?

Code:
ActiveSheet.Range("$A$9:$L$7958").AutoFilter Field:=12, Criteria1:="TRV"

View 5 Replies View Related

Autofilter Will Not Always Select Entire Sheet

Sep 4, 2009

I have a workbook that uses Autofilter.
Column A has data. Column B is hidden, has no data, and is empty.
Colmn C has data, on through the rest of the sheet (to Column AB).

Why column B has no data is unimportant for now. It, however, must maintain its existance and cannot be deleted.

When I select the autofilter sort button on column A, it selects only that column, and not the rest of the sheet. Data is subsequently scrambled.

When I unhide the empty column B and select the sort button on column B, it selects the entire sheet. Data remains intact.

When I select the sort button on column C, it selects the rest of the sheet, but not column A (with data), or B (with no data). Data is subsequently scrambled.

View 5 Replies View Related

Possible To Select All Data Labels In A Series And Nudge / Move Them All At Once?

Jun 5, 2014

I click on one label, and all labels get selected. This is good. But then when I try to grab them to move all of them, they become deselected except for the one the mouse was over. I want to move them all at once.

View 2 Replies View Related

How To Select Covered Data Point On A Series In A Chart

Jul 15, 2013

At the moment I've got a chart with 3 series lines on it and each line has 12 points. I need to select the 12th point on each series in the chart and create a label for it. The 3 lines are Budget, Forecast and Actual and often the Forecast line hits the same points as the Budget line in the chart and every time I try to find a way to select the last point on the Forecast line, I end up selecting the budget one because it's the one in the foreground.

I can select the forecast line with the keyboard arrows, but not the last point.

I also try to zoom in to get it but one of my charts has exactly the same forecast line as budget line and I still need the forecast line because the forecast will change in future.

I can delete the budget line then add it back, but this is difficult and one I'd have to repeat many times because I'm always making graphs and labelling the final point in a series is something I'm going to have to do more often.

How do I select the last point on the forecast line if it's directly behind the budget line?

View 4 Replies View Related

VBA Userform - Select Months To Apply To Autofilter

Nov 15, 2011

I have a userform that allows you to select months to apply to an autofilter, In the code below ComboBox2 is the beginning Month, and Combobox5 is the last month in what I want to be a range of months. I need it to account for the months inbetween. Currently using my code it only selects the 2 months, not those inbetween.

Code:
Private Sub RunButton_Click()
Unload DataReport
Rows("1").AutoFilter Field:=24, Criteria1:=Me.ComboBox2, Operator:=xlOr, Criteria2:=Me.ComboBox5
Call Filtered
Call AMasterBuild
End Sub

View 6 Replies View Related

Autofilter First Row - Select Data / Copy And Paste In Other Workbook

Aug 7, 2013

I need a vb code which would open different workbook automatically, autofilter the first row and select data and copy and paste in the other workbook.

View 1 Replies View Related

Custom Autofilter (select Case Statement, Two Dates)

Jan 14, 2007

I have a workbook with 2 sheets I want to make an autofilter by two method :

- select case statement
- two dates

View 4 Replies View Related

Select Series (lines) In Line Graph By Adding Userform With Checkboxes On A Chart

Apr 15, 2014

I want to add a user-form on a chart, which will have check-boxes that will allow me to select series(lines) that I want see and compare in a chart. Currently my line chart has 24 series (Lines) which makes the chart very difficult to view and looks very busy. How do I add list of check-boxes that will allow me to select one or multiple lines that I want to see at a time?

View 2 Replies View Related

Change A Series Of Rows.

Feb 12, 2009

I want to change the values arranged in the row wise to the format I have attached in the excel sheet. Manually it would be very tiresome.

View 4 Replies View Related

Creating New Rows From A Series

Feb 21, 2008

I have a need to expand data rows such as the following example:

A cell in a column of alphanumeric characters contains for example: 9,2,36J,10-13,42L-42N
In this example I need to replace this row with 10 new rows (deleting the orginal) so they would be expressed like this:
9
2
36J
10
11
12
13
42L
42M
42N

View 9 Replies View Related

Formatting Series Of Rows According To Column Value

Aug 23, 2007

I have a large datset that looks like this:

++++++++++++++++++++++++++++++++++
+ + A + B + C +
++++++++++++++++++++++++++++++++++
+1+ ID + EventDate + EventType +
+2+ 111 + 1/1/1995 + Visit +
+3+ 111 + 1/30/1995 + Vaccine +
+4+ 111 + 4/22/1998 + Visit +
+5+ 222 + 7/7/2000 + Survey +
+6+ 333 + 8/8/2001 + Labs +
+7+ 333 + 8/22/07 + Pharmacy +
+8+ 333 + 8/22/07 + Visit +

I would like to shade the rows with alternating colors so that all the data pertaining to a given ID can be easily spotted. In the example above, I would need A2:C4 to be shaded one color, A5:C5 another color, and A6:C8 the first color again.

I am using Excel 2007.

View 10 Replies View Related

AutoFilter - Using Selectable Rows

Aug 7, 2007

If I create a pivot table, I'm able to click the arrow to the right on my row header, unselect "Show All" and then manually check boxes next to the rows I want to show. The pivot table then shows only the rows I'm interested in.

I can't figure out how to do this with filtering outside of the pivot table. I can select AutoFilter and then select "All", "Top 10" or individual rows, but I don't have the option to use a checkbox style selection to choose multiple, but not all, rows.

How can I set this up to have checkboxes associated with the AutoFilter dropdown so I can pick and choose which rows show?

View 9 Replies View Related

Vba Autofilter Non-contiguous Rows

Nov 15, 2009

I have a workbook that is used for storing test results that relate to people in different groups.

B4, C4, D4 are the surname, first name and group headings. This is what I want to filter by.

Column E is empty

F,G,H,I,J,K are the results.

Column L is empty

M is total of results

What I want to do is set an autofilter from B-L, only have drop downs on B,C,D. But in addition to this I want to have it that the range can dynamically change if another column of results is inserted.

To calculate my formulas in the worksheet I named/defined M4 as 'Total' so that I could then offset from this named cell to determine the range of test result columns, which works well. I just don't know how to do this in vba.

I have this to just get the autofilter running:

With ActiveSheet
.Unprotect ("password")
.AutoFilterMode = False
.Range("B4:L4").AutoFilter

.Protect ("password")
End With

I need the range to be B4: offset of the cell 'total' 0,-1

and I need to loop through from F - offset of the cell 'total' 0,-1 and turn the dropdown off on each of these headers.

View 9 Replies View Related

Number Rows With AutoFilter On

Oct 23, 2007

I am trying to number col A from 1-??? with auto filter on. The only way I know how to do this would be to type 1 in the top col and drag it down, however when autofilter on, this doesnt work. Is there a way to do this, with or w/o VBA?

View 8 Replies View Related

Delete Rows After AutoFilter

Jan 5, 2008

I use Excel 2007 and need to find the best way to delete rows selected after Auto-filter. This autofilter selects multiple criteria for a particular column. The closest post to do what I am looking for is: [url]

But this doesn't really help me firstly because it pops out an input box and asks to enter 1 criteria. I have multiple criteria for each column depending on which I'd like to delete rows.

Alternately, I have been trying this code belwow but its too time consuming for my 50,000 rows.

Sub CodeCleanup()
Dim r As Long
r = 65536
For I = 1 To r
If Cells(I, 30).Value = "R" Then
Rows(I).Delete
End If
Next I
End Sub

View 3 Replies View Related

Inserting Blank Rows Between Different Series Of Data?

Sep 3, 2013

I would like to know how can i insert a blank row in between ACC# when ever a new series of data begins

name Acc # Balance Date
John 2222 200 june 2013
John 2222 344 june 2013
John 2222 700 Sept 2013
Silva 4444 333 June 2013
Silva 4444 333 June 2013
Silva 4444 333 June 2013
Raff 5555 897 June 2015
Raff 5555 897 June 2015
Raff 5555 897 June 2015
Raff 5555 897 June 2015

View 2 Replies View Related

Hide Rows Based On Autofilter

May 7, 2014

I have a spreadsheet that is split in two parts , one with headers in row 16 with data flowing down to row 190. In row 192 I have another set of headers with data flowing down from that to row 300.

I have a userform (roughly at cell B13 in the attached) that filters the first block of data into either Company, Syndicate, EU Corporate or ALL. (ignore the other filters) which feature in range B18:B190

What I want it to do, is that when one of the three options is selected, ie Company, is that all rows from 193 down are hidden other than those that are also Company (in the test case there is just one row). The same is true for when Syndicate or EU Corporate are selected in the userform, and if the ALL is selected then none are hidden.

View 2 Replies View Related

Userform Autofilter Visible Rows

Aug 5, 2014

I have a Userform that it makes possible to step through the the spreadsheet. It works with Previous and Next buttons. The Userform opens with a doubleclick. This works fine, but when I use an autofilter and the criteria reduces the number of rows, the Userform shows the hidden rows as well as the filtered rows. How could it be made that it only steps through the visible rows?

View 2 Replies View Related

Userform Autofilter Visible Rows

Jul 11, 2007

I have a Userform that allows you to step through the the spread sheet that works with Previous and Next buttons. This works fine.

When I use an autofilter where the criteria reduces the number of rows the Userform shows the hidden rows as well as the filtered rows. how can I make it just show the visible rows.

View 14 Replies View Related

Delete Blank Rows With Autofilter?

Jan 14, 2012

I have created a file where I use the Subtotal function. Once I collapse the information to only give me the Total, I would like to copy the Total rows into another worksheet. However, when I do this I get blank lines in between. I am trying to find a way to delete the blank rows in between the Total rows I need. Is there a way to do this with the auto filter function?

View 1 Replies View Related

Autofilter - Ignore Non-visible Rows

Jan 20, 2014

I have a spreadsheet with over 20000 rows of data and have used autofilter to find the information I want to check. Once I have these rows I want to check whether the cells in Column AE are higher/lower than the number (in this case '3'). Once it finds a cell that meets this condition then it copies and pastes the whole row so that I can review the entry.

The problem I'm having is that it doesn't work all the time. I've tested it a number of times in break mode & played it throughout and it works as expected, whereas other times it picks up the top row (header) and duplicates it or it picks up hidden rows and pastes them in sheet 2 if the condition is met. I want it to just pick up rows if they are visible (using the filter) if the condition is met.

Here's what I have so far:

Code:

Sub Lvl3v2()
'Level 3
Dim i As Integer
Dim r As Range
Dim c As Range
 
i = Worksheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row

[Code] .........

View 2 Replies View Related

AutoFilter By Rows (with Orientation - Left To Right)?

Jun 17, 2007

Is it possible to use AutoFilter by Rows (with Orientation - Left to Right)?

View 9 Replies View Related

Delete All Rows Hidden By Autofilter

Oct 3, 2007

I'm wondering if anyone has a answer to the problem of deleting all the rows that are hidden by an autofilter. We currently have a spreadsheet used within the office that catalogues all applications received, and we want to select all the applications that are relevant to a certain month with the autofilter and use a macro to delete those that are irrelevant, before emailing the spreadsheet to a client. Manually deleting all irrelevant rows would be time-consuming.

The current code I have is:

With Worksheets("Sheet1")
If .AutoFilterMode Then
With .AutoFilter.Filters(1)
If .On Then
Else: Rows.Delete
End If
End With
Else:
End If
End With

The theory is that the code first selects the relevant worksheet, determines whether autofilters are on, selects data that is being covered by the autofilter, indentifies those that is being displayed and does nothing, and identifies those which are not displayed and deletes them - in theory!

View 7 Replies View Related

Count Visible Rows After AutoFilter

May 16, 2008

Is there a simple way to count unhidden rows? I saw Counting number of unhidden rows =SUBTOTAL(103,D11:D7180) and, frankly, I'm wondering if there is a way to do it without a formula. I don't need the count in a cell, per se, just a quick count of the unhidden rows of a worksheet for usage elsewhere.

View 5 Replies View Related

Macro - Fill Series Requires Two Rows Of Data!

Aug 18, 2007

regards the two attached files (both are identical) except '1' has TWO Rows of data above the Macro Button and works correctly whereas '2' has only ONE Row (the desired option but does not work correctly!( Inserts Row in wrong place and incorrectly fill series)).

basically the program inserts a additional row below the last data entered, copies a formula cell from above and finally (the problem area) Series Fills a cell from data above.

View 10 Replies View Related

Transposing Column Series Of Data To 2nd Sheet In Rows

Jun 19, 2008

I have a column with (for example) 5 entries A1, A2, A3, and so on. I would like to pick up this data, tranpose it into a row, put it on the 2nd sheet, but (again for example) be specific about where i want it to go. I may want to have A1 at B2, A2 at E2, A3 at H2, etc

-A B C D E F G H
1x
2y
3z
4
5

becomes

-A B C D E F G H
1
2 -x - - y - - z
3
4
5

View 9 Replies View Related

Chart Wizard Limited To 6 Rows Of Data For Series

Nov 24, 2009

I am trying to create a line graph and I have 17 rows of data for 17 different employees. There are 18 rows when including the header row.

My data is as follows

Column A - Employee Name
Column B - Month 1 data
Column C - Month 2 data
Column D - Month 3 data
Column E - Month 4 data
Column F - Month 5 data

When I highlight the data and go to the chart wizard, I select "Series in Rows".

However, on the series tab it only brings in the data for 6 employees.

Is there a way to automatically bring in all the data without having to do it manually, or is this a limitation of Excel?

View 9 Replies View Related

Macro: Plot Graph/Chart By Series Of Rows

Jun 30, 2008

I've been trying to work out a code for a while now to plot some series in rows on a graph. The wonderful Mr Pope helped me with one before but for series in columns but i just don't seem to understand it enough to use it for this problem. the graph already has 2 series plotted (called the envelope) so i have to use seperate series to plot the data.

Basically the name of series is down column A
but the range is from E1 to Y1
and the data to be plotted on the graph which already has two series plotted in it is E2 to Y2, E3 to Y3 etc. iv been trying to use this code but failing miserably

Sub adddatatopsd(Name As Range, XData As Range, YData As Range)
With ActiveSheet.ChartObjects(1).Chart
With .SeriesCollection.NewSeries
.ChartType = xlColumnClustered
.XValues = XData
.Values = YData
.Name = Name
.ChartType = xlXYScatterSmooth
End With
End With
End Sub...........................

View 4 Replies View Related

AutoFilter VBA - Filter And Delete Unwanted Rows

Oct 25, 2012

I'm trying to filter and delete unwanted rows as I need row where dates is within a specified range.

How can I do this using AutoFilter? or are there any other alternatives?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved