# Formula to pull unique SKUs based on the Brand choosen

Copper Contributor

# Formula to pull unique SKUs based on the Brand choosen

Hi,

Attached is a screenshot of examples of how i would like a formula written where I choose the brand and a formula is below that will automatically update with the SKUs from the master data on the left based on the chosen brand.

2 Replies

# Re: Formula to pull unique SKUs based on the Brand choosen

``=IFERROR(INDEX(\$B\$2:\$B\$25,SMALL(IF(\$A\$2:\$A\$25=\$G\$1,ROW(\$A\$2:\$A\$25)-1),ROW(A1))),"")``

You can try this formula in cell F4. Enter the formula with ctrl+shift+enter if you don't work with Office 365 or Excel 2021. Then fill the formula down as required.

# Re: Formula to pull unique SKUs based on the Brand choosen

An alternative for cell F4. Because this is one of the Dynamic Array functions, it will spill into whatever rows beneath F4 are required to fulfill the condition. So you would not what to have that second request in the same column.

``=UNIQUE(FILTER(\$B\$2:\$B\$25,\$A\$2:\$A\$25=G1,"none"))``

As your data stands currently all of the SKUs with brand A are unique, so you wouldn't really need the function "unique"; in that case it is redundant. However, if in fact the list was longer and had duplicate instances of A and 3, for example (a different kind of list, say, of items ordered rather than just a list of brands and SKUs) then this with UNIQUE in it is the more precise formula.