Find Single Value in Column

SOLTEC

Board Regular
Joined
Feb 11, 2015
Messages
195
Office Version
  1. 365
  2. 2019
Platform
  1. Windows

Excel 2010
DE
1Product Name
21Replacement Boot Laces
31Replacement Boot Laces
43Blousing Garters
53Blousing Garters
63Blousing Garters
73Blousing Garters
87GI Extreme Cold Weather Bunny Boots
97GI Extreme Cold Weather Bunny Boots
107GI Extreme Cold Weather Bunny Boots
117GI Extreme Cold Weather Bunny Boots
127GI Extreme Cold Weather Bunny Boots
137GI Extreme Cold Weather Bunny Boots
1413Nylon Commando Wallet
1513Nylon Commando Wallet
1613Nylon Commando Wallet
1713Nylon Commando Wallet
1813Nylon Commando Wallet
1913Nylon Commando Wallet
2013Nylon Commando Wallet
2120Pepper Sprays Gel Sabre Red
2221Fire Master Fog Pepper Spray
2320Pepper Sprays Gel Sabre Red
2420Pepper Sprays Gel Sabre Red
2520Pepper Sprays Gel Sabre Red
2620Pepper Sprays Gel Sabre Red
2726Key Chain Pepper Spray
2820Pepper Sprays Gel Sabre Red
2928Cop Top Fog Cone Pepper Spray
3029Flip Top Stream Pepper Spray
3130Flip Top Cop Med Fog Cone Pepper Spray
3220Pepper Sprays Gel Sabre Red
3332Cop Top Stream Pepper Spray
3420Pepper Sprays Gel Sabre Red
3528Cop Top Fog Cone Pepper Spray
3629Flip Top Stream Pepper Spray
3730Flip Top Cop Med Fog Cone Pepper Spray
3832Cop Top Stream Pepper Spray
3920Pepper Sprays Gel Sabre Red
4020Pepper Sprays Gel Sabre Red
4140Police Magnum Sabre Red
4220Pepper Sprays Gel Sabre Red
Workspace
Cell Formulas
RangeFormula
D2=VLOOKUP(E2,B:C,2,FALSE)
D3=VLOOKUP(E3,B:C,2,FALSE)
D4=VLOOKUP(E4,B:C,2,FALSE)
D5=VLOOKUP(E5,B:C,2,FALSE)
D6=VLOOKUP(E6,B:C,2,FALSE)
D7=VLOOKUP(E7,B:C,2,FALSE)
D8=VLOOKUP(E8,B:C,2,FALSE)
D9=VLOOKUP(E9,B:C,2,FALSE)
D10=VLOOKUP(E10,B:C,2,FALSE)
D11=VLOOKUP(E11,B:C,2,FALSE)
D12=VLOOKUP(E12,B:C,2,FALSE)
D13=VLOOKUP(E13,B:C,2,FALSE)
D14=VLOOKUP(E14,B:C,2,FALSE)
D15=VLOOKUP(E15,B:C,2,FALSE)
D16=VLOOKUP(E16,B:C,2,FALSE)
D17=VLOOKUP(E17,B:C,2,FALSE)
D18=VLOOKUP(E18,B:C,2,FALSE)
D19=VLOOKUP(E19,B:C,2,FALSE)
D20=VLOOKUP(E20,B:C,2,FALSE)
D21=VLOOKUP(E21,B:C,2,FALSE)
D22=VLOOKUP(E22,B:C,2,FALSE)
D23=VLOOKUP(E23,B:C,2,FALSE)
D24=VLOOKUP(E24,B:C,2,FALSE)
D25=VLOOKUP(E25,B:C,2,FALSE)
D26=VLOOKUP(E26,B:C,2,FALSE)
D27=VLOOKUP(E27,B:C,2,FALSE)
D28=VLOOKUP(E28,B:C,2,FALSE)
D29=VLOOKUP(E29,B:C,2,FALSE)
D30=VLOOKUP(E30,B:C,2,FALSE)
D31=VLOOKUP(E31,B:C,2,FALSE)
D32=VLOOKUP(E32,B:C,2,FALSE)
D33=VLOOKUP(E33,B:C,2,FALSE)
D34=VLOOKUP(E34,B:C,2,FALSE)
D35=VLOOKUP(E35,B:C,2,FALSE)
D36=VLOOKUP(E36,B:C,2,FALSE)
D37=VLOOKUP(E37,B:C,2,FALSE)
D38=VLOOKUP(E38,B:C,2,FALSE)
D39=VLOOKUP(E39,B:C,2,FALSE)
D40=VLOOKUP(E40,B:C,2,FALSE)
D41=VLOOKUP(E41,B:C,2,FALSE)
D42=VLOOKUP(E42,B:C,2,FALSE)


I need to find unique (only one) values in Column D:E. The numbers are combinations. I need to find the values that have only one item number in the column.

Thank you in advance for any and all assistance.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
SOLTEC,

You did not say where you wanted the results to be written to.

I do not have your actual raw data worksheet, so I put simple formulae in column D to represent the numbers.

Raw data, and, results in the same screenshot:


Excel 2007
DEFG
1Product NameProduct Name
21Replacement Boot Laces1Replacement Boot Laces
31Replacement Boot Laces3Blousing Garters
43Blousing Garters7GI Extreme Cold Weather Bunny Boots
53Blousing Garters13Nylon Commando Wallet
63Blousing Garters20Pepper Sprays Gel Sabre Red
73Blousing Garters21Fire Master Fog Pepper Spray
87GI Extreme Cold Weather Bunny Boots26Key Chain Pepper Spray
97GI Extreme Cold Weather Bunny Boots28Cop Top Fog Cone Pepper Spray
107GI Extreme Cold Weather Bunny Boots29Flip Top Stream Pepper Spray
117GI Extreme Cold Weather Bunny Boots30Flip Top Cop Med Fog Cone Pepper Spray
127GI Extreme Cold Weather Bunny Boots32Cop Top Stream Pepper Spray
137GI Extreme Cold Weather Bunny Boots40Police Magnum Sabre Red
1413Nylon Commando Wallet
1513Nylon Commando Wallet
1613Nylon Commando Wallet
1713Nylon Commando Wallet
1813Nylon Commando Wallet
1913Nylon Commando Wallet
2013Nylon Commando Wallet
2120Pepper Sprays Gel Sabre Red
2221Fire Master Fog Pepper Spray
2320Pepper Sprays Gel Sabre Red
2420Pepper Sprays Gel Sabre Red
2520Pepper Sprays Gel Sabre Red
2620Pepper Sprays Gel Sabre Red
2726Key Chain Pepper Spray
2820Pepper Sprays Gel Sabre Red
2928Cop Top Fog Cone Pepper Spray
3029Flip Top Stream Pepper Spray
3130Flip Top Cop Med Fog Cone Pepper Spray
3220Pepper Sprays Gel Sabre Red
3332Cop Top Stream Pepper Spray
3420Pepper Sprays Gel Sabre Red
3528Cop Top Fog Cone Pepper Spray
3629Flip Top Stream Pepper Spray
3730Flip Top Cop Med Fog Cone Pepper Spray
3832Cop Top Stream Pepper Spray
3920Pepper Sprays Gel Sabre Red
4020Pepper Sprays Gel Sabre Red
4140Police Magnum Sabre Red
4220Pepper Sprays Gel Sabre Red
43
Workspace
Cell Formulas
RangeFormula
D2=1


Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

1. Copy the below code
2. Open your NEW workbook
3. Press the keys ALT + F11 to open the Visual Basic Editor
4. Press the keys ALT + I to activate the Insert menu
5. Press M to insert a Standard Module
6. Where the cursor is flashing, paste the code
7. Press the keys ALT + Q to exit the Editor, and return to Excel
8. To run the macro from Excel press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.

Code:
Sub GetUniques()
' hiker95, 03/11/2015, ME841664
With Sheets("Workspace")
  [D1] = "D"
  .Range("D1:E" & .Cells(Rows.Count, 5).End(xlUp).Row).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Columns("F:G"), Unique:=True
  [F1] = ""
  [D1] = ""
  .Columns("F:G").AutoFit
End With
End Sub

Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm, and, answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.

Then run the GetUniques macro.
 
Upvote 0

Forum statistics

Threads
1,216,616
Messages
6,131,757
Members
449,670
Latest member
ryanrodgers2014

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