Good Day all.
I have a sheet example that has an ALL tab were data is actualy changed in the 5 sheets that takes the data and puts it in groups of defeciant test scores. a couple of thing get messed up id you insert a row into the All tab.
1. any filters set in the other sheets go away.
2. the cell referces from the all tab get outta wack and I have to pull them down again.
Now I think I have the person doing the inputting to just add any new people to the sheet at the bottom then resort them, this will work fine but I still have to go into each sheet and re-do each filter that I have set up for each sheet.
So is there anyway to filter out the blanks in my sheets so I get the correct deficency reports per each class. This will make sence I think when you look at the workbook.any advice would be great.
Last edited by komet12; 09-01-2011 at 09:00 AM.
See if this workbook helps. It should remove the need for filters.
Typically
With Sheet "BPD_DEF"
1/. Insert 2 columns at the start of the sheet, these will be used as helpers and can be hidden.
2/. In A2
Drag/Fill Down to match the rows in Sheet "All" and a bit more to allow for as much entries as you reasonably expect to have.=IF(AND(All!A2<>"",All!H2<70),ROW(C2),"")
3/. In B2 this array formula
Confirm with Ctrl+Shift+Enter not just Enter.=IF(ROW()-ROW($B$2:$B$1000)+1>ROWS($A$2:$A$1000)-COUNTBLANK($A$2:$A$1000),"",INDIRECT(ADDRESS(SMALL((IF($A$2:$A$1000<>"",ROW($A$2:$A$1000),ROW()+ROWS($A$2:$A$1000))),ROW()-ROW($B$2:$B$1000)+1),COLUMN($A$2:$A$1000),4)))
Drag Down as required.
4/. In C2
Drag Across to your last required column (Column P?), then Down as required.=IF($B2="","",IF(INDEX(All!A:A,$B2)="","",INDEX(All!A:A,$B2)))
Repeat this for each sheet adjusting the column reference in column A to suit
i.e.
=IF(AND(All!A2<>"",All!H2<70),ROW(C2),"")
Hope this helps.
Note
I have removed all names, macros, and tidied the C/F to clarify this sample workbook.
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
Thank You So MUCH, This solved alot of issues. Awsome
Last edited by komet12; 09-01-2011 at 09:01 AM. Reason: Found 1 other thing in the code
If you look at the BPD_DEF tab Marcus isnt Deficient in anything yet it is showing he is. it should in each tab show the people deficient in that catagory but it is still catching some that are not deficient. Looking at this It happened when I added a new person then resorted the All tab. so is there another way to add a person to this and sorting it in alpha, without is messing up? I tried to insert a line too didnt fare all that well either. Man this code is awsome if I can just keep them from adding new.
Last edited by komet12; 09-01-2011 at 09:09 AM.
Marcus doesn't show in tab "BPD_DEF" in the sample I posted.
Have you downloaded the sample and compared it with your actual workbook?
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
Indeed, that's the easiest way, I should have mentioned that!
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
What would be an easy way to automate the sort so she don't mess this up, such as a "sort button" I tried to record a macro but that didnt work, went back to my excel 2010 bible still reading lol
I have the following macro :
In 2010 I created a tab and that worked ok, however the end user is using 2007 so is there a way I can have a code that would create a tab or something in the ribbon that would allow her to execute this??Sub SarahSort() ' ' Macro1 Macro ' sort alpha ' ' Keyboard Shortcut: Ctrl+Shift+S ' Columns("A:N").Select ActiveWorkbook.Worksheets("All").Sort.SortFields.Clear ActiveWorkbook.Worksheets("All").Sort.SortFields.Add Key:=Range("A:A"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("All").Sort .SetRange Range("A:N") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Range("O1").Select End Sub
Last edited by komet12; 09-02-2011 at 10:01 AM.
Try this workbook, it should sort as you go, no buttons required.
Add a new name at the bottom of the list, fill Column A first then Column B.
You should be able to add/delete rows in Sheet "All" as required. (Don't add/delete columns)
This code goes in the worksheet module for Sheet "All"
If you have other sheets in the workbook, you will have to exclude them from the last loop, or specify the sheets that the code has to work with.
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim ws As Worksheet Dim isect As Range Dim LastRow As Long Dim strTarget As String, strFormula As String LastRow = Range("A" & Rows.Count).End(xlUp).Row If LastRow = 1 Then Exit Sub On Error GoTo ResetApplication Set isect = Intersect(Target, Range("B2:B" & LastRow)) With Application .EnableEvents = False .ScreenUpdating = False End With If Target.Cells.Count = 1 Then strTarget = Target If Not isect Is Nothing Then Range("A2:N" & LastRow).Sort key1:=Range("A2"), Order1:=xlAscending, _ key2:=Range("B2"), Order2:=xlAscending Range("C2:C" & LastRow).Find(What:="", After:=Range("C2")).Select End If End If If Not isect Is Nothing Then For Each ws In ActiveWorkbook.Worksheets If ws.Name <> "All" Then With ws strFormula = .Range("A2").Formula .Range("A2:A" & .Range("A" & .Rows.Count).End(xlUp).Row).Clear .Range("A2").Resize(LastRow, 1).Formula = strFormula End With End If Next End If ResetApplication: Err.Clear On Error GoTo 0 Set isect = Nothing With Application .EnableEvents = True .ScreenUpdating = True End With End Sub
Hope this helps.
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
Well Of course I have a issue, she sent me back the sheet all screwed up, she was entering data in the result sheet bpd, meeting ect.... (cant follow instructions) so can I protect the sheets to accept data only through the macros and formulas and not from direct entry into cells?
Try this workbook. It's protected without passwords.
If you want to use a password then use the same password for all the sheets (except sheet "All", it can have a different one).
For each sheet apply the formatting and protection as shown then apply your password.
Then in the code for the worksheet module Sheet "All" worksheet_change event.
Change these lines
ToWith ws .Unprotect Password:="" strFormula = .Range("A2").Formula .Range("A2:A" & .Range("A" & .Rows.Count).End(xlUp).Row).Clear .Range("A2").Resize(LastRow, 1).Formula = strFormula .Protect Password:="" End With
With ws .Unprotect Password:="Your Password" strFormula = .Range("A2").Formula .Range("A2:A" & .Range("A" & .Rows.Count).End(xlUp).Row).Clear .Range("A2").Resize(LastRow, 1).Formula = strFormula .Protect Password:="Your Password" End With
I hope that she understands this, however I'm sure you'll keep her right.
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
on the komet12_testing sheets yours do not show the formulas, but I cannot get mine even them protected NOT to show the formulas?? all else seems ok though
Select the whole sheet in question (Not Sheet "All") then
Format > Format Cells ...
Select the Tab "Protection" and check both boxes Locked and Hidden
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
I have another issue with this sheet Marcol, I have a complete new sheet of People that in in essence going to be tha (all) sheet. I need to compare the 2 sheets and add any new ones to the list. I then need to take the names in tha (all) sheet recompare and those names that are not on the new list need an addendum in the notes line of there info stating "no longer LT but has training"
![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks