Excel VBA: hide/unhide columns in day-over-day tracker, skipping weekend
columns
Simple in concept hard to implement. Been trying all day with no luck.
I have a day=over-day tracker. With each new day I would like to be able
to run a macro that hides the previous day and unhides the current day. I
have 10 days showing at a time (current day + 9 previous).
Through Googling, I was able to find some good code that functions as I
describe except that it does not skip a column (which I would need to have
occur if I want to essentially skip over weekend days in my tracker).
Thanks for your help.
sub whatever()
dim i as long
for i = 4 to 34
if columns(i).hidden = false then
bfirst = true
columns(i).hidden = true
columns(i + 10).hidden = false
exit for
end if
next
end sub
No comments:
Post a Comment