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  

Formula for 0



 
 
Thread Tools Display Modes
  #1  
Old June 24th, 2009, 06:43 AM posted to microsoft.public.excel.worksheet.functions
Fareez
external usenet poster
 
Posts: 27
Default Formula for 0

Dear Friends
I want to find out 0 value and delete that columns say for ex
45862 0 46502 0 47449 0 48002 0
in this example i want to delete all columns which is 0 value.

thanks in advance
  #2  
Old June 24th, 2009, 07:12 AM posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default Formula for 0

Hi,

1. Select the whole range
2. Press Ctrl+F enter 0 in the Find what box
3. Options, Match entire cell contents
4. Find All.
5. Select the first found entry
6. Scroll to the last fount value and hold down the Shft key and click it
(this selects all the 0 cells).
7. Click Close, and press Ctrl+- (control minus) and choose Entire column

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Fareez" wrote:

Dear Friends
I want to find out 0 value and delete that columns say for ex
45862 0 46502 0 47449 0 48002 0
in this example i want to delete all columns which is 0 value.

thanks in advance

  #3  
Old June 24th, 2009, 07:13 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Formula for 0

Try the below macro. If you are new to macros set the Security level to
low/medium in (Tools|Macro|Security). From workbook launch VBE using
short-key Alt+F11. From menu 'Insert' a module and paste the below code.
Save. Get back to Workbook. Run macro from Tools|Macro|Run selected macro()

Sub DeleteEmptyColumns()
For lngCol = Cells(1, Columns.Count).End(xlToLeft).Column To 1 Step -1
'Hide rows with zeros and blanks
If WorksheetFunction.CountIf(Columns(lngCol), 0) + _
WorksheetFunction.CountBlank(Columns(lngCol)) = _
Rows.Count Then Columns(lngCol).Delete
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Fareez" wrote:

Dear Friends
I want to find out 0 value and delete that columns say for ex
45862 0 46502 0 47449 0 48002 0
in this example i want to delete all columns which is 0 value.

thanks in advance

  #4  
Old June 24th, 2009, 07:35 AM posted to microsoft.public.excel.worksheet.functions
Fareez
external usenet poster
 
Posts: 27
Default Formula for 0

Thanks for your reply. but it works only if it has been typed in column. but
my case is that amount is linked with other sheet.

"Shane Devenshire" wrote:

Hi,

1. Select the whole range
2. Press Ctrl+F enter 0 in the Find what box
3. Options, Match entire cell contents
4. Find All.
5. Select the first found entry
6. Scroll to the last fount value and hold down the Shft key and click it
(this selects all the 0 cells).
7. Click Close, and press Ctrl+- (control minus) and choose Entire column

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Fareez" wrote:

Dear Friends
I want to find out 0 value and delete that columns say for ex
45862 0 46502 0 47449 0 48002 0
in this example i want to delete all columns which is 0 value.

thanks in advance

  #5  
Old June 24th, 2009, 10:24 PM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Formula for 0

Shane

A little trick to replace the Shift and scroll

6. hit CTRL + a to select all found 0 cells


Gord Dibben MS Excel MVP

On Tue, 23 Jun 2009 23:12:02 -0700, Shane Devenshire
wrote:

5. Select the first found entry
6. Scroll to the last fount value and hold down the Shft key and click it
(this selects all the 0 cells).


 




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 09:25 AM.


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