Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default omit zeroes from a list

Say i have a list in a column

A
B
0
0
C
D
0
E

I would like to have a list that is the same as above but omits the zeroes
in another column, without hiding rows.

A
B
C
D
E

But not an autofilter bar, as I'd like for the list to automatically omit
the zeroes without having to mess with an autofilter bar.

Many thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default omit zeroes from a list

try this.

Sub copynonzero()
Lr = Cells(Rows.Count, "a").End(xlUp).Row
Range("A1:a" & Lr).AutoFilter Field:=1, Criteria1:="<0"
Range("a2:a" & Lr).SpecialCells(xlCellTypeVisible).Copy Range("c1")
Range("A1:a" & Lr).AutoFilter
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kevin026" wrote in message
...
Say i have a list in a column

A
B
0
0
C
D
0
E

I would like to have a list that is the same as above but omits the zeroes
in another column, without hiding rows.

A
B
C
D
E

But not an autofilter bar, as I'd like for the list to automatically omit
the zeroes without having to mess with an autofilter bar.

Many thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default omit zeroes from a list

=IF(ISERROR(SMALL(IF($A$1:$A$20<0,ROW($A$1:$A$20) ,""),ROW($A1))),"",
INDEX($A$1:$A$20,SMALL(IF($A$1:$A$20<0,ROW($A$1:$ A$20),""),ROW($A1))))

which is an array fomula, so commit with Ctrl-Sift-Enter, not just Enter,
and copy down as far as you need.

--
__________________________________
HTH

Bob

"kevin026" wrote in message
...
Say i have a list in a column

A
B
0
0
C
D
0
E

I would like to have a list that is the same as above but omits the zeroes
in another column, without hiding rows.

A
B
C
D
E

But not an autofilter bar, as I'd like for the list to automatically omit
the zeroes without having to mess with an autofilter bar.

Many thanks.



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I set the default for "show zeroes" to not show the zeroes? jeel Setting up and Configuration of Excel 1 January 25th 08 07:18 PM
Data validation, select from list: omit blanks? George[_3_] Excel Discussion (Misc queries) 1 December 8th 07 06:22 PM
how do i omit the a list, and it's matches, so neither exists? markcjr Excel Worksheet Functions 3 January 31st 07 01:46 AM
How do I represent omit in a list of data in excell? kjalj Excel Discussion (Misc queries) 0 October 30th 06 03:51 PM
Dropdown list in PivotTable has deleted items. How to omit? Bonny Excel Discussion (Misc queries) 1 June 27th 06 03:16 AM


All times are GMT +1. The time now is 02:25 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"