aequitas1903
Board Regular
- Joined
- Mar 8, 2012
- Messages
- 127
Hi everyone,
I am working on a project and I was a little confused how to do it with vba and lack of knowledge. Hope you guys can help me.
I will try to explain the situation, I got an excel which has nearly 800 sheets and in sheet named "Summary" where B column has numbers from 100 to 799 (All this numbers have specific sheet for themselves. Sheet names are like 100,101,102 ,....,799) and column E has a summary of absolutes of column C + column D. I wish to delete the sheets which F column value is zero (meaningless numbers). I can show you a little example what I mean.
[TABLE="class: grid, width: 500, align: left"]
<TBODY>[TR]
[TD][/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]100
[/TD]
[TD]12
[/TD]
[TD]13
[/TD]
[TD]=abs(c1)+abs(c2) =25
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]101
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]102
[/TD]
[TD]9
[/TD]
[TD]-9
[/TD]
[TD]18
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]103
[/TD]
[TD]3
[/TD]
[TD][/TD]
[TD]3
[/TD]
[/TR]
</TBODY>[/TABLE]
As mentioned before I got 800 values in E column. I can filter and see which numbers are zero. In the table above sheet named 101 should be deleted.
I thought to use a formula (=vlookup(101,'summary'!A:E,5.FALSE) in A1 cell in every sheet to see if the value of the number is zero and delete that sheet. For example the macro will check A1 column in everysheet and if the value is zero it will delete the sheet entirely. Or It can filter zero valued numbers in column E in "Summary" sheet and delete sheets from there.
Is it possible to do something like this ? I appreciate your thoughts and knowledge and it will save my hours if it is possible. I have to change number values periodicly and have to analyze them all everytime.
Any help is appreciated. Any ideas can give me a new perspective.
Thanks for your help.
Kind Regards
I am working on a project and I was a little confused how to do it with vba and lack of knowledge. Hope you guys can help me.
I will try to explain the situation, I got an excel which has nearly 800 sheets and in sheet named "Summary" where B column has numbers from 100 to 799 (All this numbers have specific sheet for themselves. Sheet names are like 100,101,102 ,....,799) and column E has a summary of absolutes of column C + column D. I wish to delete the sheets which F column value is zero (meaningless numbers). I can show you a little example what I mean.
[TABLE="class: grid, width: 500, align: left"]
<TBODY>[TR]
[TD][/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]100
[/TD]
[TD]12
[/TD]
[TD]13
[/TD]
[TD]=abs(c1)+abs(c2) =25
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]101
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]102
[/TD]
[TD]9
[/TD]
[TD]-9
[/TD]
[TD]18
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]103
[/TD]
[TD]3
[/TD]
[TD][/TD]
[TD]3
[/TD]
[/TR]
</TBODY>[/TABLE]
As mentioned before I got 800 values in E column. I can filter and see which numbers are zero. In the table above sheet named 101 should be deleted.
I thought to use a formula (=vlookup(101,'summary'!A:E,5.FALSE) in A1 cell in every sheet to see if the value of the number is zero and delete that sheet. For example the macro will check A1 column in everysheet and if the value is zero it will delete the sheet entirely. Or It can filter zero valued numbers in column E in "Summary" sheet and delete sheets from there.
Is it possible to do something like this ? I appreciate your thoughts and knowledge and it will save my hours if it is possible. I have to change number values periodicly and have to analyze them all everytime.
Any help is appreciated. Any ideas can give me a new perspective.
Thanks for your help.
Kind Regards