Hide Zeroes in Dropdown List?

c.clavin

Board Regular
Joined
Mar 22, 2011
Messages
123
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi guys, I'm running into a wall with this. Is there a way for a dropdown list to not return entries with zeroes? I have something like Product A, Product B, 0, Product C, 0. I'd like to have the zeroes not show up, is there anything I can add to my formula to get them out of there? Thanks!!

This is my formula I'm using right now:
=OFFSET('SELECTED OPT'!$N$1,0,0,COUNTA('SELECTED OPT'!$N:$N),1)
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
First of all, OFFSET is a volatile function which can slow down performance (Volatile Excel Functions -Decision Models). An alternative to what you're trying to accomplish is to use INDEX. Therefore, see if the following works for you.
Excel Formula:
=LET(rng,'SELECTED OPT'!$N$1:INDEX('SELECTED OPT'!$N:N,COUNTA('SELECTED OPT'!$N:$N)),FILTER(rng,rng<>0))
 
Upvote 0
Assuming that you are referring to a Data Validation drop-down list ..

An option that I would consider would be to produce the list elsewhere (I have used column Z on 'SELECTED OPT' but it could be anywhere). I have used 1000 but use any number that will be sure to be big enough for any data that you might have in column N.

c.clavin.xlsm
NOYZ
1Product AProduct A
2Product BProduct B
30Product C
4Product C
50
6
SELECTED OPT
Cell Formulas
RangeFormula
Z1:Z3Z1=FILTER(N1:N1000,N1:N1000<>0)
Dynamic array formulas.


Then in your Data Validation ..

c.clavin.xlsm
C
1
2
3
4
5
Sheet1
Cells with Data Validation
CellAllowCriteria
C1:C5List='SELECTED OPT'!Z1#
 
Upvote 0
This one worked great, thanks. I did not know about the volatile functions either. Very good to know. Thanks guys!
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,742
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top