excel - Loop Through Dynamic Filtered List[Solved] -


how loop through visible rows in filtered list? have cell in first filtered row in let's column b "y". need able change non-hidden cells in specific column y. needs dynamic because column b range going different everyday.

essentially, need modify code:

range("b2").select --where b2 "y"  selection.autofill destination:=range(*this unsure*) 

not sure trying achieve here autofill, give idea how deal filtered cells...

dim ws worksheet dim lr long dim fillwith string  set ws = activesheet    'change per requirement lr = ws.usedrange.rows.count fillwith = ws.range("b2").value     'change per requirement if ws.filtermode     if ws.range("b1:b" & lr).specialcells(xlcelltypevisible).cells.count > 1         ws.range("b2:b" & lr).specialcells(xlcelltypevisible).value = fillwith     end if end if 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -