#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
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).


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:04 PM.

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

About Us

"It's about Microsoft Excel"