Also posted here:
https://stackoverflow.com/questions/50614124/excel-conditional-formatting-fo-when-any-cell-in-usedrange-changes-value
down vote
favorite
I have to send workbooks off to managers in different departments and in each workbook, the managers might amend/change certain fields...
I have 3 xlsm workbooks with a bunch of macros inside of them.. When each one is opened, the user is presented with a pop up that asks if they want to execute the Call_All macro which would run them all. If the user clicks yes, then it executes, and if no then nothing happens.
The reason I have...
On all the sheets.. I did a first pass just to check your code and see if it worked and then I noticed that not a single sheet had the filter applied to it.. So then I stepped through it to see what was happening.
Hi Skip,
Thank you for getting back to me..
I actually had forgotten I posted this question, sorry..
I did manage to get a working solution:
https://stackoverflow.com/questions/50294190/vba-remove-duplicates-across-multiple-sheets-in-workbook
Public Sub DeleteDuplicates2()
Dim wb As...
Hi Skip,
Thank you for the reply again..
I also stepped through the code you provided but it seems to be skipping the part where it applies the filter..
At this line:
If UBound(filter(filterCols, ws.Cells(1, a), True, vbTextCompare)) < 0 Or IsEmpty(.Cells(1, a)) Then _
It just skips to the...
Hi Skip,
I'm sorry you seem to be getting irritated with me.
I am really not trying to waste your time because that wouldn't be beneficial to me either as it would then take longer to get a solution.
"I'm not going to waste my time trying to figure out what code you want me to look at...
Apologies Skip,
I thought you just wanted an xlsx file.. Attached is the xlsm file with the macros..
Module 4 is the one we are using here now..
https://files.engineering.com/getfile.aspx?folder=2ebb6820-f9bf-4327-adf0-4958a1ca0be2&file=SampleBook.xlsm
Ahhhh for the first time I have successfully managed to upload a file :)
I have attached the file that I use, I just changed the Employee Numbers and the names of the applications.https://files.engineering.com/getfile.aspx?folder=801e7e51-8a6e-41e3-80bb-77db128ecb5b&file=SampleBook.xlsx
Hi Skip,
Thank you for the reply.
I put your code into my macro and ran it but unfortunately it now deletes everything on all the sheets. So after I run the code and go into any sheet, the sheets are empty.
"Why not just set a flag as well?"
Could you explain what you mean by this please? I...
Hi Skip,
When I change the code as you suggested above, it deletes the data on the sheets where there is no filter applied.
I even thought of perhaps doing a check to see if a filter is applied to a sheet before it processes a deletion but it also deletes the data on the sheets where there is...
Hi Skip,
So I realized you could be asking your question for two reasons:
1) Where is the actual code that applies the filter
2) In which column have I applied the filter
Answers:
1) The filter is already applied to all the sheets.
When I introduce a new piece of code to current macros, I...
Just to get back to the original post regarding the deletion of the filtered cells..
The code for deleting works great, but it also deletes the visible cells on the sheets where the filter is not applied - because these sheets do not have a "Status" header..
Here is the code:
Sub...
Also posted here:
https://stackoverflow.com/questions/50294190/vba-remove-duplicates-across-multiple-sheets-in-workbook?noredirect=1#comment87610856_50294190
I have multiple sheets in a particular workbook, and n each sheet there are Employee Numbers. The sheets have already been sorted in a...
Hi Skip,
Ahhhh yes, I remember now!
Sorry Skip, long days and I cant think when I am done..
I got it working :)
Here is the code:
Sub ManipulateSheets()
Dim ws As Worksheet
Dim a As Long
Dim filterCols As Variant
Dim wkbk1 As Workbook
Set wkbk1 = Workbooks("3rd...
Originally posted here:
https://stackoverflow.com/questions/50248746/vba-apply-filter-across-multiple-sheets-if-column-header-is-a-match
I have a macro that renames certain headers, deletes certain columns and inserts a row on specific sheets.
I need to apply a filter across the sheets IF the...
No. The loop ends at column 2 as you will note. As you stated, column A ALWAYS has the correct heading."
Ahhh my apologies, I didn't realize that your code took that into consideration..
Would you please show me where so that I know for future reference how to read it?
I think it could be...
Thank you for your reply Skip..
Just one or two things..
I see in your reply you only using "Status" and not "Employee Number" & "Status".. Would this not delete the columns that have employee number as the header too?
And I believe at the end of your code where you have the "next", it should...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.