VBA - Copying Hidden Cells Without Turning Off Autofilter

Jul 9, 2014

I am working on a file with different users entering information on different sheets (tracking the status of individual projects and activities). Using the macro below (which I found in the forums), the individual data will be combined on a master sheet. My problem is that some of the users will be using autofilters to filter their own data (for example--filtering to show only the "Open" projects). When I do the copy of the individual data, I want ALL of the data, not just the data that is being shown by the individual filter settings.

At first, I just turned the individual filters off before copying the data. The other users have asked if there is a way around this or alternatively, restore the filter values after the copy.

A key point, there are currently 8 user sheets. Each user is allowed to set their own filters and change them at will-e.g. one day, a user may filter on projects due in Q3, another day she may be looking at all projects closed in 2013.

VB:
Sheets("Combined").Select
ActiveWindow.SelectedSheets.Delete
Dim J As Integer
On Error Resume Next

[Code] .....

View 2 Replies


ADVERTISEMENT

Copying From Hidden Cells Are Not Copying Protected

Dec 12, 2007

I am trying to make the cells Iam am copying paste hidden cells with all formats - seems to work fine other than the security part of them, Iam makeing a sheet for work and just trying to make it were it will not get destroyed by other users-

View 12 Replies View Related

How Do I Create A SUMIF To Ignore Cells Hidden With Autofilter

Feb 5, 2009

I have a formula to search a sheet for certain criteria and sum up the total, data is entered into this sheet by week number, where I then filter it for whichever week I need. I following formula works fine, but adds all the cells including hidden ones, how can i get it to ignore hidden cells??

=SUM(IF('FT Line 1-RX'!$C$2:$C$2100='FT costs 1-Rx'!B$1,IF('FT Line 1-RX'!$E$1:$GT$1='FT costs 1-Rx'!$A11,'FT Line 1-RX'!$E$2:$GT$2100)))

There is raw data in the 'FT Line 1-RX' sheet which is summed up in the 'FT costs 1-RX' sheet.

View 9 Replies View Related

Copying Hidden Cells

Feb 16, 2009

I am copying a range of rows (which include some hidden rows). When I paste them I see all the rows. Is there a way to retain the hidden attribute?

View 2 Replies View Related

Textboxes Moving To Cell A1 On Top Of Each Other After Turning Off AutoFilter

Mar 29, 2013

I have a workbook with some code inside of it. When I turn off Autofilter after using the buttons in the top left of the sheet to filter by cell color all of the text fields on the entire sheet are moving to A1 on top of each other. I have no idea why this is happening nor is it throwing an error. I uploaded the sheet here [URL] .. for further review. I tried uploading on this site but the file is too large to upload.

View 4 Replies View Related

Workbook Copying (all Hidden, Unhidden, And Very Hidden)

Jun 30, 2007

im looking for a basic macro for workbook copying, all workbook(all hidden, unhidden, and very hidden) sheets.

i know how to do unhidden sheets of course however the hidden and very hidden are giving me some trouble...i need to also copy over all the macro's, buttons, and drop down box's as well..not just values.

View 4 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

Deleting Hidden Rows Based On Results Of Autofilter

May 23, 2007

I am performing an autofilter within a spreadsheet to display only those lines where a name exists in column A. Then I delete all hidden rows. I am having a problem when the autofilter results in no rows being visible. Here is the code I am using for the delete hidden rows:

On Error Resume Next ' In case there's no hidden cells

With Cells
Set rngHidden = .SpecialCells(xlCellTypeVisible)
.EntireRow.Hidden = False 'Unhide all cells
rngHidden.EntireRow.Hidden = True 'Hide previously visible cells
.SpecialCells(xlCellTypeVisible).EntireRow.Delete 'Delete previously hidden cells
rngHidden.EntireRow.Hidden = False ' Unhide previously visible cells
End With
End Sub

View 9 Replies View Related

Format All Cells In All Sheets To Protection Hidden On Visible And Hidden Tabs

Feb 28, 2014

I am trying to format all cells on all sheets (hidden or otherwise) as "Locked" so when the sheets are protected the user can't see the formulas. This macro individually selects every sheet in the book and applys the formatting. Is there a way to modify this code to accomplish the same thing without having it actually select every sheet? The only reason it is an issue is that after running the macro you end up on the last sheet in the book.

View 7 Replies View Related

Copying And Pasting In Hidden Sheet?

Aug 14, 2012

I have the following code (which works fine when the sheet isn't hidden)

Code:
FinalRow2 = TtlRev.Cells(Rows.Count, 1).End(xlUp).Row
TtlRev.Range("AM6:AO6").Copy
TtlRev.Range(Cells(6, 39), Cells(FinalRow2, 41)).Select
ActiveSheet.Paste

However, I need to hide the sheet, but it doesn't work because you can't use .select on a hidden sheet I believe. Any way of doing this to a hidden sheet?

View 4 Replies View Related

Dates - Cells Turning Red

Aug 28, 2008

I have a column of dates and have been asked to turn a cell next to it green, orange or red but I don't think this can be done?

Otherwise is there a way to turn the background of the cell a different colour, am sure there is?

What I need is if for example the date in the column is 01.08.08 then up until 7 days I want it to turn green, between 8-10 days I want it to go orange and over 10 days it needs to go red. Is this possible?

View 9 Replies View Related

Turning On Relative Cells

Feb 3, 2010

I have this formula:
=IF('2010'!R10C2="y",'2010'!R10C3,"")

And I want to be able to drag it down and have the cells update, but all it does is keep the same values.

Is there something I need to turn on or off.

View 9 Replies View Related

Excel Select And Copy Without Copying Hidden Rows?

Mar 7, 2012

Ok I recently ran into something in Excel that was completely unexpected. When I filter data, and select multiple rows of data, and copy and paste it.... it pastes the unfiltered rows as hidden rows! Is there a way around this without copying row by row?

View 1 Replies View Related

Copying Results From An Autofilter To A New Worksheet

Aug 27, 2009

I'm working on a quote template that has 600+ products with descriptions and prices that gets autofiltered down to one product. After it has been filtered down to that one product how do I link that to a new worksheet?

View 9 Replies View Related

Turning Formula Cells Into Numbers

Dec 11, 2008

I populated an XL sheet from another one using a formula. However, in order to use my new sheet I need all the cells to be numbers and not formulas. Is there a way to turn all the formulas into numbers, leaving behind just the numerical value ? Basically like pasting only values, only without having have to paste them somewhere else.

View 2 Replies View Related

If Conditional Formatting (turning Those Cells Off)

Jun 9, 2009

what i want to do is say:

If A1="" then color B1 and C1 black, basically turning those cells off

View 2 Replies View Related

Turning Locations In Cells Into Values

Aug 4, 2009

I am looking to do find the latest date in a list of dates but have several problems:
1) The dates are all in one column on worksheet 1, but are sourced from other worksheets. So even though it looks like '8/7/09', the value of the cell is 'Worksheet2!B4'. This is making the MAX function not work

2) How to deal with the blank cells in the MAX function?

View 12 Replies View Related

VBA Copy Cells From 1 Worksheet To Another Turning Out All Wrong?

Jul 16, 2013

I'm just trying to copy certain cells from one worksheet & add them to the next available row on the next sheet, my data is going right down to the end of the sheet though (row 1048554) & instead of placing them on the same row its placing them in the row underneath the previous data in the next column. My code is below & I've included a table at the very bottom of how the data is coming out.

Sub Copydata()

Range("A" & Rows.Count).End(xlUp).Offset(1).Select

Sheets("PO").Select

[Code]....

View 2 Replies View Related

VBA To Hide Sheet In Workbook And Copying Hidden Sheet

Dec 12, 2013

I have a userform which clones the latest sheet and produces copy of it on the next sheet. The first sheet they will be cloning is the sheet called 'template', I however want this to be hidden since I do not want anybody to modify a sheet which basically serves purpose of a template. And once cloned, it is no longer needed.

On the click of the command button, the macro will create sheet1 taking the info from sheet named 'Template' in the same workbook . And now on the next click of the command button, Sheet 2 is created taking the info from sheet1 and Sheet 3 is created taking the info from Sheet 2 and so on. Here is what I currently have, so how can i modify it in order for my scnerio to work?

To select the last sheet in the workbook

Code:

Sheets(Sheets.Count).Select
To create new sheet

Code:

Sheets(Sheets.Count).Copy After:=Sheets(Sheets.Count)Sheets(Sheets.Count).Name = MyEvent & " " & MySCN & "(" & ThisWorkbook.Sheets.Count - 2 & ")"

View 3 Replies View Related

VBA Function For Hidden Cells?

Apr 7, 2014

I am trying to make a function that will only show the value of visible cells (so I can have excel calculate a slope/offset of a filtered table. I made the function below, and it seems to work pretty well.

Option Explicit

Function Visible(x) As Variant
Application.Volatile
If x.Rows.Hidden Then
Visible = ""
ElseIf x.Columns.Hidden Then
Visible = ""
Else: Visible = x.Value
End If
End Function

However, when I try to use it in an array formula instead of with an individual cell (example, {=SUM(Visible(A1:A10))} ), it only evaluates the hidden property on the first cell. So if the first cell is hidden, all cells will be blank, and if the first cell is not hidden, all values are summed, regardless if some of the later cells are hidden.

I usually use the IF and IFERROR functions with the SUM functionto filter out values I don't want, and I assumed I could do the same with this custom function.

View 3 Replies View Related

Hidden Cells And SUBTOTAL

Feb 27, 2007

If I have two columns of data, one for mortgage rate and one for loan size, then use a data filter to display a subset of the data, how can I calculate a weighted average on just the hidden cells? Is there any sort of criteria flag that looks for hidden cells in a range? Sort of the inverse of the SUBTOTAL function.

View 9 Replies View Related

How To Stop From Clearing Hidden Cells

Aug 10, 2014

I have cells, or columns hidden when I do not need them, but I have to a data entered in those cells to make my spread sheet work. Usually just 0.

When I do the all clear or " clear all contents" operation at the end of the day, it clears the hidden data/cells too. Is there anything I can do to stop excel from clearing those hidden cells?

View 3 Replies View Related

Can You Password Protect Hidden Cells?

Aug 19, 2009

I was wondering if it was possible to hide cells using protect sheet? I have a worksheet that contains confidential data and would like it so the cells appeared blank unless you had the password. I know you can hide rows and columns but I need everything on the sheet to be hidden.

View 2 Replies View Related

Can't Unhide Cells And Got Hidden Formulas?

Sep 3, 2009

I've unlocked it fine, revealed formulas etc, but it doesn't make sense so must be a hidden formula stopping people like me from unlocking the hidden treasures!!!!

At the moment it stops at column V and I can't get it to unhide any further???

Used the edit, go to, etc won't go.

Deleted all code in vb I can see or find

Tried clicking on all sheet and unhide

Nothing!?

View 9 Replies View Related

Copy Hidden Cells And Paste Them

Jul 26, 2009

I'm trying to copy a range with hidden rows,
but if i do like this:

range("A1:A10").copy Destination:=Range("A15")

but, as i said, some rows are hidden and i want copy them too.

Unfortunately Excel copy only visible...

How can i copy an paste hidden cells too?

View 9 Replies View Related

Search In Cells Hidden By Filter

Jun 10, 2009

So the find method works on visible and hidden rows depending if you use LookIn:=xlValues or xlFormulas; however, it does not work on hidden rows caused by a filter.

I have a range that is filtered, and I want to find a value in a column that may or may not be the filter criteria (and thus hidden). I do not want to show all the data, do the find, then reapply all the filters again. I could loop through the column, but I am looking to see if Excel offers a more efficient way.

View 9 Replies View Related

Exclude Hidden Cells In Average

Jul 18, 2007

I have a large data table that has autofilters on the headings.

I also have a "Data Summary" Sheet in which I would like to get a conditional average.

Here is my *working* array formula:

=AVERAGE(IF('Data Table'!$C$10:$C$65536=A2,'Data Table'!$BP$10:$BP$65536))

The problem is, it averages all cell values (conditional upon the C column's cell being equal to A2 of course), whereas I only want to average the VISIBLE cells that match the condition.

I have tried using a little VBA with:

Function Vis(Rin As Range) As Range
'Returns the subset of Rin that is visible
Dim Cell As Range
Application.Volatile
Set Vis = Nothing
For Each Cell In Rin
If Not (Cell.EntireRow.Hidden Or Cell.EntireColumn.Hidden) Then
If Vis Is Nothing Then
Set Vis = Cell
Else
Set Vis = Union(Vis, Cell)
End If
End If
Next Cell
End Function

and then trying the formula:
=AVERAGE(IF(Vis('Data Table'!$C$10:$C$65536)=A2,Vis('Data Table'!$BP$10:$BP$65536)))
but it does not work.

View 8 Replies View Related

How To Get LARGE Function To Ignore Hidden Cells

Oct 2, 2012

How to get the LARGE function to ignore hidden cells? Is it possible?

I have a filter in a data set and am using a macro to pull in the top 5 largest values.

View 3 Replies View Related

Set (LastRow) As Dynamic That Counts Hidden Cells

Jul 30, 2013

I have set my 'lastrow' to the last value in column A. The problem is, this code gets run whenever an autofilter is made. As a result, the 'lastrow' records itself as the last row of visible data. In reality, I need it to track the actual last row of total data.

lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

View 9 Replies View Related

Conditional Formatting To Ignore Hidden Cells?

Feb 1, 2014

I have conditionally formatted (Bold Italic) some data (the highest value in each column) and I have a macro that hides rows dependent on one value in that row. However I would like the conditional formatting to apply only to the visible cells, so that if the maximum value is in a row that is hidden the conditional formatting is applied to the highest, non-hidden value.

View 9 Replies View Related







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