UNIQUE function returning 0

thewiseguy

Well-known Member
Joined
May 23, 2005
Messages
1,019
Office Version
  1. 365
Platform
  1. Windows
Hi all. I am using the UNIQUE function on a column full of text and the last unique value being returned is a 0. I have this occurring in 2 different UNIQUE functions.

How can I check the reference cells to see where this is coming from?

Any help is greatly appreciated.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Those cells should not cause a problem, but without more data & a clear understanding of what you are trying to do, I cannot say more.
 
Upvote 0
Those cells should not cause a problem, but without more data & a clear understanding of what you are trying to do, I cannot say more.

Here is the reference data:

Proposal5.xlsm
QRSTUVWXY
1Fixture/LampAuxiliary ProductMaterialsFixture/Lamp Qty.Aux. Product Qty.Materials Qty.Location NotesProduct Used for BOM/LaborQty Used for BOM/Labor
2T-1 Lighting 135W LED Linear High Bay w/ Occ. Sensor 5KConstant Wattage LED Emergency Back-Up Kit1/2 Inch Locknut225  
INPUT
Cell Formulas
RangeFormula
T2T2=IF(OR(P2="Tubes2Ft",OR(P2="Tubes3Ft",OR(74="Tubes4Ft",OR(74="Tubes8Ft",OR(74="TubesUBend",OR(74="Lamps,")))))),(M2*VLOOKUP(J2,ExistingFull,5,0)),M2)
X2X2=IF(N2="Yes","",Q2)
Y2Y2=IF(X2="","",T2)



Here is the output data, returning '0'

Proposal5.xlsm
ABCDEFGHIJKLM
1ManufacturerItemFixtureCategoryProduct IDQtyCostLinePOQtyOrderedShipperTrackingReceivedOn-Site
2 0     
3ASDASD 10W LED Security Light 5KSecurityASD-LSR-1050-AP1$32.50$32.50
BOM_FixLamps
Cell Formulas
RangeFormula
B2:B19B2=SORT(UNIQUE(FILTER(INPUT!X2:X200,INPUT!X2:X200 <>"",FALSE)))
C2:C3C2=IFERROR(VLOOKUP(B2,BOMProductNoRange,2,0),"")
D2:D3D2=IFERROR(VLOOKUP(B2,INDIRECT(VLOOKUP(C2,TableNames,2)),8,0),"")
E2:E3E2=IFERROR(IF(SUMPRODUCT(--(INPUT!$X$2:$X$200=B2),INPUT!$Y$2:$Y$200)=0,"",SUMPRODUCT(--(INPUT!$X$2:$X$200=B2),INPUT!$Y$2:$Y$200)),"")
F2:F3F2=IFERROR(VLOOKUP(B2,INDIRECT(VLOOKUP(C2,TableNames,2)),17+MATCH(E2,{0,21,51,101},1),0),"")
G2:G3G2=IFERROR((E2*F2),"")
A2:A3A2=IFERROR(LEFT(B2,FIND(" ",B2)-1),"")
Dynamic array formulas.
 
Upvote 0
Not sure why you are getting the 0, but then with only one row of data, that's not surprising.
Best guess is that somewhere in X2:X200, you either have a 0, or a cell that is not totally empty, or contains a ""
With that formula empty cells & cells returning "" will be ignored.
 
Upvote 0
Not sure why you are getting the 0, but then with only one row of data, that's not surprising.
Best guess is that somewhere in X2:X200, you either have a 0, or a cell that is not totally empty, or contains a ""
With that formula empty cells & cells returning "" will be ignored.

what is the definition of "not totally empty?
 
Upvote 0
The cell contains something.

so each cell contains the same formula, just copied down. could it be something in the reference cells?

column 'N' and 'O' are both validations. Or could it be formatting?
 
Upvote 0
I have no idea, because I can't see them. :)
Do you have the Input sheet setup to hide cells with 0

ahh i did make a few adjustments to the custom formatting. but that should only affect it in column X or Q, correct?
 
Upvote 0
Depends on what columns you changed the formatting on. ;)
 
Upvote 0

Forum statistics

Threads
1,224,836
Messages
6,181,251
Members
453,027
Latest member
Lost_in_spreadsheets

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