excel - Active Filter Triggered from Cell Data -


I will have a filter which I can type in entry in a cell, then the rest column filter. When this entry is approved, it should look back before starting to write the sheet. Currently, when I remove it from that box, it clears all the data from the worksheet.

What I am currently using is this code. Does anyone know how to do this job properly?

  Personal sub worksheet tags (Bye-by-target) if (intact (target, range ("G2") is nothing), then exit from All End Cells.AutoFilter Field: = 7, Criteria 1: = "=" & amp; Category ("G2") End Sub  

I believe this code Criteria will remove You have empty value in G2 . I also added a check to make sure that your target is only a cell, your code will trigger at this time if you have modified the entire range containing G2 .

  Private sub worksheet tags (Bye-by-range) If the goal is nothing, then exit the target from Target.Cells.Count & gt; 1 Then exit sub from the target. Line & lt; & Gt; 2 Then exit LastCol as Long LastCol = Room (4, column.). End (xlToLeft). Column If Target.Value = "" Range (Cell (4, 1), Cell (4, LastCol). Autofilter Field: Target: Column Els Range (Cell (4, 1), Cell (4, LastCol). Autofilter Field: = Target column: Criterion 1: = "=" and Goal. End of End if the end code  

update code to work for any value that is changed in line 2. < / P>


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -