Excel Hide Rows Macro - Microsoft Community


hi,

i using code below hide blank rows.  the macro runs extremely slow.  is there way speed up?

thanks in advance!

sub hiderows()
    beginrow = 171
    endrow = 1314
    chkcol = 9

    rowcnt = beginrow endrow
        if cells(rowcnt, chkcol).value < 1 then
        cells(rowcnt, chkcol).entirerow.hidden = true
        end if
    next rowcnt
end sub
sub unhiderows()
    rows("171:1314").entirerow.hidden = false
end sub

re:  hiding rows

in addition, turning off screen updating help...

sub hiderows
application.screenupdating = false

 'code

application.screenupdating = true
end sub

and, practice use:   option explicit    first line in module.

'---
jim cone



Office / Excel / Other/unknown / Office 365 for business



Comments

Popular posts from this blog

Getting ErrorCode: 120018 when trying to access Microsoft account - Microsoft Community

The message was sent to a distribution list ‎(DL)‎ - Microsoft Community

Activation Error 0x8004FE93 - Microsoft Community