Auto Filtering :: Return The Worksheet Backs To Its Original State Before I Autofiltered?

Mar 6, 2008

I have a worksheet with various data autofiltered. I know when I filter on one of the fields, the drop down arrow becomes blue. If I filter on one or more fields, finding which fields I have autofiltered can become hard to find.

This is my question -- Can I put a button or some type of one touch command were I can take those autofilters off and return the worksheet backs to its original state before I autofiltered?

View 9 Replies


ADVERTISEMENT

Reset Workbook To Original State

Dec 21, 2008

I am looking to create a macro button which will reset the sheet to its original state.

I have locked the cells users should not imput data into, and unlocked where they add their data.

At the end of every school year, they will need to be able to reset ALL the workbooks back to their original state with all the reference formulas.

I am thinking I will need to tell the macro to create a hidden copy of the workbooks and then upon hitting reset it will use the backup to override the current. But they will need to be able to reset at the end of every year.

I would like to have one reset button that resets ALL the workbooks at once, but if not, I could put a reset button on each workbook.

As I have just started my VBA training, I have a code that will create a backup and hide it, but I have no idea how to do the reset portion. And again, since they need to be able to reset it each year for x amount of times, I don't know how to get it to keep having a fresh backup and get everything to its original.

View 9 Replies View Related

Macro To Save Worksheet As New File Then Return To Original File

Mar 14, 2014

I have a macro which successully saves a worksheet as new file to another file path....(below)...but I can't figure out how to close this new file and return to the original file...

Dim myPath As String, fName As String
myPath = Sheets("Date").Range("C8").Text
fName = Sheets("Date").Range("C9").Text
Sheets("Sage CSV File").Copy
With ActiveWorkbook
.SaveAs Filename:=myPath & fName
End With'

View 2 Replies View Related

Copying An Autofiltered Query From Worksheet A To Worksheet B In The Same Book

Jan 6, 2009

There is an autofilter applied to worksheet A, I would like to transfer only the autofiltered range from worksheet A to worksheet B, a clear worksheet B statement would also help.

View 9 Replies View Related

Copying Information From An Autofiltered Worksheet

Feb 6, 2009

I want to create a macro that will take information from one worksheet to another. The problem is that the first worksheet has an autofilter and i do not know how copy information only from the cells that were filtered with the correct information without copying it manually.

View 3 Replies View Related

Copy AutoFiltered Data, Less Headings, To Another Worksheet

Jun 3, 2008

I want to filter the data and next. I want to copy the data from sheet1 to sheet2;
below code working fine, but.

Sub CopyFilter()
Dim rng As Range
Dim rng2 As Range
With ActiveSheet.AutoFilter.Range
On Error Resume Next
Set rng2 = .Offset(1, 0).Resize(.Rows.Count - 1, 1) _
.SpecialCells(xlCellTypeVisible)
On Error Goto 0
End With
If rng2 Is Nothing Then
MsgBox "No data to copy"
Else.............................

View 2 Replies View Related

Transfering Large Amounts Of Autofiltered Data To New Worksheet

Feb 10, 2009

I have a problem with my current macro that uses a basic autofilter to auto filter from the parent database to extract the correct rows and then copies the query and pastes it into a new worksheet to further proceed with the macro.

I have run into a problem because my database has become very big and now when I try to autofilter the query and click on copy, an error regarding the data range reference is too complex - use data that can be selected in one contiguous rectangle

I tried a few things such as to autofilter out everything I dont need and hit delete - this does not work either, same result

I got help here previously in which the code deletes All Hidden Rows and this is very time consuming, I have not tested all my methods but it took 15 minutes to delete hidden files for one method and theres roughly 5 in total

I have to end up running this code on the parent worksheet multiple times because I use the parent worksheet to extract different parameters into different worksheets!

I have noticed that if I manually copy the data in smaller blocks, by halving the data seems to work,but I do not know how large of a partition I am limited to copy because my database is very large and the size varies month-to-month so I cannot put a number on the max range. I think if I could get a macro to do it by thirds or preferably quarter range should be safe.

So just to summarize, I am trying to devise a method in which I would auto filter on the active parent sheet "sheet 1" and I would copy the auto-filtered query to "sheet2" instead of copying the whole worksheet in one instance I would like to split the autofitlered query into four equal parts with respect to the range of the worksheet and then to copy the first quarter of the query and paste in sheet 2 and then the second quarter to sheet 2 and so on untill all four quarters are done one after the other, so sheet 2 should be a series of all four parts combined into one series on sheet2

View 9 Replies View Related

Return Area Code For State

Jul 20, 2007

I would be loading data into a spreadsheet, and when there is a phone number I'd like to have it populate the state field. (ex. (212) 123-1234 in the phone field, would populate "NY" in the state field, is this possible? If so is there any brief way to describe how to do so without taking too much of your time?

View 9 Replies View Related

Return State Value Based On Match Of Name And Number Between High And Low

Aug 27, 2013

I have a set of data (Data tab) that lists name, a high number, a low number, and the state that is associated with the name and range between the high and low number (see attachment). I am trying to figure out a formula that will return the state value based on a match of the name and the number between the high and low. I am trying to use Index/Match but i cant figure out the "between the high and low" portion.

tester.xlsx

View 2 Replies View Related

Returning State Cities By Inputting Given State Abbreviation

Jun 3, 2012

I'm trying to create an array formula that returns all the cities in a given state by imputing the state's abb in cell K2. The returned cities go into column J. California has the most cities(430) and the cities are 5000 rows deep.

View 7 Replies View Related

Get State Of Checkbox On Worksheet

Jan 14, 2009

I need to get the state (xlon or xloff) of check boxes on a worksheet. i have tried the following but unable to get it to work.

View 3 Replies View Related

Reverse Engineer Macro To Return Data Back To Similar State?

Feb 26, 2014

I am trying to create a macro, that ultimately does the reverse of one written a while back.

I have created a macro that exports "Roster_Data" to "envision_Roster" in .csv style formatting. What I want to achieve is reverse engineer the macro to return the data back to a similar state.

I am trying to transpose column D into rows that correspond with dates in column c in a sheet called "OutputView" this in essence is similar if not exactly the same as the original worksheet "Roster_Data"

I have split the macro I am working on into three separate modules.

Module 1 - Initial Export of "Roster_Data" to "envision_Roster"

Module 2 - Format and output worksheet to find MAX date and MIN date and produce top rows of data

Module 3 - Analyse, Undertake Logical Tests of data, and transpose to suit (Replicate the initial "Roster_Data" view)

I'm having trouble visioning this altogether so I've been starting with basic code to output basic stuff, but I still can't relate this back to my data.

[Code]....

View 2 Replies View Related

Vb Return To Original Sheet To Paste

May 1, 2008

If I ask in a macro to open sheet containing a fax header, copy it, then how do I tell Vb to return to the original sheet to paste. There many sheets that require this from a button click on the sheet and instead of storing the graphic in all sheets I just want 1 copy so file closes faster. I would normally just name the original sheet, but this will change with every sheet.

View 13 Replies View Related

How To Return To Original Sheet The Name Varies

Oct 2, 2008

I need to know how to select the sheet the user was on at the time they ran the macro. The macro has to select (because I'm not yet smart enough to avoid all the selecting...) cells on other sheets, but I want to return to the sheet they started from at the end of the macro.

Unfortunately, they create these sheets themselves, and I have no idea what they will be named, or where they will be, or what their code numbers will be. They could delete them at any time and rearrange.

Sorry if this is a really dumb question. I suspect it is, but I can't find out how to fix it, and most people are smart enough to avoid the selects so I suspect it isn't an issue for them.

View 9 Replies View Related

Return To Original Page, Cell After Macro

Nov 5, 2009

I have a workbook with 7 sheets. Each sheet has about 9 different macro buttons that are repeated all over the sheet in various locations. I want to return automatically to the sheet and cell that was last active before running a macro.

View 2 Replies View Related

Return To Original Sheet After Print Array

Jun 14, 2006

The code prints a series of sheets. Afterwards these sheets are "group"ed together. The code can be accessed from 2 different sheets. I need to figure out how to get rid of the grouping and return to the original sheet.

Private Sub CommandButton1_Click()
Sheets( Array("Pipe", "Pipe Flow")).PrintOut
UserForm1.Hide
End Sub

View 2 Replies View Related

Change Value Of A Cell With Checkbox And Return It Back To Original Value?

Nov 29, 2011

I'm trying to make cell values in a range change so they appear blank when a checkbox is checked, and when it is unchecked, I need the original value to appear. I have the following so far:

Private Sub CheckBox1_Click()

If CheckBox1.Value = True Then Range("BTS").Value = ""

End Sub

...However I do not know how to change the cells back to the original value before it was made blank.

View 2 Replies View Related

Return To Original Cell After Freeze Panes Macro

Dec 3, 2007

I have a workbook where I have columns requiring entry from A to AD. I have set conditional formatting in column A to show a colour if there is an entry in column AD. I would like to use a macro to always freeze panes in column D (to show the data in the first 3 columns) and the macro would then show column AD in the other frozen pane/split.

As there will always be an entry in column A but not always in column AD I want to be able to select any highlighted row in column A , run the macro and the cursor will be showing in column AD on the same row ( relative reference?) thus showing the entry in AD next to the other info in columns A, B and C.

At the moment I have a macro that unfreezes my header row and is set to always choose the "next empty cell" but I don't know the code to change it to get what I want. Currently if I select any entry in column A e.g. row 100 and run the macro I find the cursor showing in AD2! Of course I would like to run another macro to return back to A on the same row too.....

View 9 Replies View Related

Rolling Look-backs In Excel With Intermittent Zero Value Cells Throughout

Nov 10, 2013

I've got a spreadsheet that lists employee hours worked by week, I'm trying to create a function that would give an automatic look-back of both 90 days and 6 months. I've found some useful answers in other threads, but they tend to hinge on a zero value cell signaling the latest week (not) worked; however, for this purpose, some employees may have zero value fields for some weeks but have worked others.

I'm looking for a formula that can be uniformly applied to all employees in the spreadsheet and average their weekly hours for the past 90 or 180 days without having to update the formula each week new hours are entered.

View 3 Replies View Related

Filtering A List Without The Auto Filter

Jan 9, 2007

I need to filter a list without the use of the Auto Filter or arrays. I'm importing the list into Xcelsius which doesn't support these functions. I will need to do the filtering with functions.

View 9 Replies View Related

Go To Another Worksheet And Then Come Back To Original

Aug 21, 2014

I'm setting up a payroll for several employees in one workbook. I start from the particular employee's worksheet and then I need to go to another sheet where various information is stored and then come back to the original employee's sheet. The current macro works fine if the various information is stored on each employee's worksheet but I can't figure out how to go to another sheet and then come back to my active cell in employee sheet.

[Code] .....

View 14 Replies View Related

COUNTIF Function Work With Auto Filtering

Apr 27, 2006

I have a large amount of student demographic, course, and class data on an
Excel worksheet for an entire school district. The ethnic code for each
student is a single alpha character. I need to find a way to get a total for
each ethnic code in each course when filtering by each course.

Each column of data has a header and I am using the Auto-filter feature for
filtering. Is there a way that the COUNTIF function can be set up for each
ethnic code so that it will count from the filtered data? If not, is there
any other function, or nested functions, that will work?

View 10 Replies View Related

Highlight Entire Row When Cell Selected Without Losing Original Formats And Color Of Original Row

Sep 5, 2012

The problem is when I highlight a row with some color the original color of the row is gone, so I tried this code, and again, it's removing the original format and color for the row This is the code from McGimpsey & Associates : Excel : Highlight row with background colors

Code:
PrivateSub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Const cnNUMCOLS AsLong=256
Const cnHIGHLIGHTCOLOR AsLong=36'default lt. yellow
Static rOld As Range
Static nColorIndices(1To cnNUMCOLS)AsLong
Dim i AsLong
IfNot rOld IsNothingThen'Restore color indices

[code].....

How can I retain the range's historical color so that when I deselect the row it reverts properly?

View 4 Replies View Related

How To Copy A Worksheet, WITHOUT Linking It To The Original Workbook?

Sep 27, 2008

A simple one for you, but again my Google skills seem lacking. This must be common practice but until one knows the key combination...

I have created a summary sheet with lots of formulas which analyse other sheets in a workbook. I want to copy this summary sheet to a seperate workbook to use as a template.

Of course, the copying process always links the new (template) sheet to the original workbook it was copied from. How does one copy without forging this link? All I want are the formulas copied across totally unchanged; I really *don't* want to manually edit 50 or so formulas!

View 7 Replies View Related

Copied Worksheet With Macros Still References Original Workbook

Oct 25, 2007

I have a workbook within which i have a worksheet that contains a lots of macro code (coded by me). As the workbook gets used by various people, i need to copy the worksheet and the macros across to the updated workbook, which doesnt contain the macro worksheet at all.

I have tried to copy it across by clicking on its tab and using the move or copy facility. This copies the sheet across as required. But for some reason, the macros all reference the old workbook. A small bit here for example for some reason opens up the old workbook and then performs the code in the old worksheet:

Sub SelectAll()
For i = 12 To 20
Set curcell = Worksheets("Form Generator").Cells(i, 3)
If curcell = False Then
Cells(i, 3).Value = True
End If
Next i
End Sub

As curcell is equal to worksheets...() i would have expected it to use the local worksheet, ie the one that the macro is attached to. So why is excel proactively hunting out the old workbook and sheet? is the method i used to copy across the sheet with the macros incorrect? If so, how should i go about it?

View 3 Replies View Related

Excel 2010 :: Build A String For Criteria1 Field In VBA For Auto Filtering

Oct 3, 2013

Code:

ActiveSheet.Range("$A$1:$AM$14502").AutoFilter Field:=1, Criteria1:= _ "30/06/2013"

When I run the above on my Worksheet to Filter for Rows not equal to 30/06/13 this works fine

I want amend the Criteria1 to a string that is derived off a value in my worksheet I have done this as below where Range("D8").Value is 30/06/13

It is deleting al my data and not keeping the rows with 30/06/13 in it.

Code:

Dim rng As Range
Dim LastQtrDate As Date
Dim LastQtrDateString As String
LastQtrDate = shtControlTab.Range("D8").Value
LastQtrDateString = "" & LastQtrDate

[Code]...

View 2 Replies View Related

Automatic Auto Filtering: Filter The List And Have A Box For Users To Type In Text

Aug 25, 2006

I have a list of a couple of thousand (and more) individual items. I want to filter the list and have a box for users to type in text (there are no numbers) and the results will be seen automatically reducing in number as more text is entered. (Similar to the Windows HELP files )

eg, typing A (or a) will show all entries beginning with A (without pressing
"Enter" or similar
typing AB will show only entries beinning with AB
typing ABO will show .........I guess you will understand the idea.

I have tried various forms of Filter - Auto and advanced - but still cannot get the spreadsheet to do what I want. Unless I am not doing the Autofilter (or Advanced filter) correctly (I am still a relative beginner!) I still cannot find a way of simply adding letters to a cell or input box and the filtering takes place 'automatically' as the letters are added.

View 8 Replies View Related

Copying Formulas Between Worksheets While Keeping Reference To Original Worksheet?

Mar 4, 2014

I have a series of formulas in Row 1 across the columns in worksheet A. I would like to copy these formulas to a single column and down rows in worksheet B while retaining the references to worksheet A. I know that I can manually enter the references in worksheet B but that would take a long time to do.

View 1 Replies View Related

SaveAs Worksheet To Another File / Folder While Keeping Original Open / Active?

Apr 15, 2014

I have an Excel Worksheet (let's call it "AA.xlsm") which uses VBA code to loop through column A, update column B with some results/values, and then (for each value in column A) SaveAs the worksheet into a different filename/path as a ".csv" type file.

My line of code for the SaveAs is as follows: Workbooks("AA.xlsm").SaveAs LEpath & CurrFldr, FileFormat:=xlCSV

My problem is that my original worksheet, AA.xlsm, gets closed whereas I need it to stay open/active after each SaveAs iteration.

View 3 Replies View Related

How To Return To "original" Sheet After Using A Link To A Other Sheets?

Jun 17, 2008

I have a workbook with about 200 sheets.
Each sheet contains lots of links to the other sheets, so the user can clink the link and then go to the new sheet.

But, how do I make a "return-function"? That can return the user to the sheet that was active before the link was followed? If possible I would like this do be doable for 5-10 sheets back.

This "return-function" is gonna be used by clicking a button on a floating toolbar I have connected to the sheet.

View 9 Replies View Related







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