Hide the rows/ Coloum

G

Gautam

Dear All,

Can we hide some rows based on any condition of data. for eg in A1 =0,
a2=2,a3=4,a5=0,a6=1 we want to hide coloum 1 and 5 as its value is zero.
Please suggest some macro by which it can be done

--
Best Regards


Gautam Tibrewal
Finance Controller
Goldwyn Limited
15 & 16,
Noida Special Economic Zone
Noida-201305
Tel: +91 120 2568537-9
Fax: +91 120 2568105
Mobile: +91 9310130632
 
D

Don Guillett

sub hidecolumnsifzero()
for i=1 to cells(2,columns.count).end(xltoleft).column
if cells(2,i)=0 then columns(i).hidden=true
nest i
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top