A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Remove columns containing all zeros



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2010, 05:50 PM posted to microsoft.public.excel.worksheet.functions
Nora_GG
external usenet poster
 
Posts: 1
Default Remove columns containing all zeros

How can I create a macro or conditional formula to remove columns containing
all zeros
  #2  
Old June 1st, 2010, 09:07 PM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 8,574
Default Remove columns containing all zeros

A simple formula way to flag it, use COUNTIF
Eg in A1: =COUNTIF(A2:A5,0)=4
Copy across. Cols to be deleted will be TRUE
--
Max
Singapore
---
"Nora_GG" wrote:
How can I create a macro or conditional formula to remove columns containing
all zeros

  #3  
Old June 1st, 2010, 10:44 PM posted to microsoft.public.excel.worksheet.functions
Nora_GG[_2_]
external usenet poster
 
Posts: 10
Default Remove columns containing all zeros

Thanks Max. I was able to flag teh columns I need to remove. Do you know a
macro that can then delete columns containing "TRUE" as the header?

"Max" wrote:

A simple formula way to flag it, use COUNTIF
Eg in A1: =COUNTIF(A2:A5,0)=4
Copy across. Cols to be deleted will be TRUE
--
Max
Singapore
---
"Nora_GG" wrote:
How can I create a macro or conditional formula to remove columns containing
all zeros

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.