Remove Duplicate Entries from List

justanotheruser

Board Regular
Joined
Aug 14, 2010
Messages
96
Hi all,

I've got a drop down list which is linked to a source sheet called "Mapping", and on this sheet I have selected my range for Data Validation for a Drop Down list.

However, there are certain values which are repeated, so I've used some IF, COUNTIF, ROWS and INDEX formulas to sort it out and remove duplicate entries.

In the table, below, the data is stored in Column C, the first part of my calculations is in Column A, and then the second part is in Column B - which I want to use as the source for my drop down list. The only problem that I have is that instead of blanks cells there are 0s in the cell as below. Could someone help me fix it? (cell C2 is intentionally blank)


Excel Workbook
ABC
1**Entity
2***
31210210
41220210
51230210
62240220
72250220
830230
930230
1030230
1140240
1250250
1360*
1470*
1580*
1690*
17100*
18110*
19120*
20130*
2114**
2215**
2316**
2417**
2518**
26***
27***
Mapping



Thanks in advance. :)
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I don't know if this is possible, but if I select the range B2:B27 in this case if the 0s were blank cells, would it be able to show just the 5 values that aren't blank/0 i.e. cells B3:B7 in this instance?

Thanks again in advance for your help! :)
 
Upvote 0
is this waht you are after?

Assuming your list in number, if not use counta( ) and subtracts number of rows that are not relevent to the list. Example

Row 1 = Title
Row 2 start of the table
then counta(a:a)-1 etc.

Excel Workbook
ABCDE
1**Entity**
2****Unique list and sorted
31210210*210
41220210*220
51230210*230
62240220*240
72250220*250
830230**
930230**
1030230**
1140240**
1250250**
1360***
1470***
1580***
1690***
17100***
18110***
19120***
20130***
2114****
2215****
2316****
2417****
2518****
26*****
27*****
Sheet1
#VALUE!
</td></tr></table></td></tr></table>
 
Upvote 0
Unfortunately no, the Entitys will not only be numbers, say for example (I just made these up), these will be as follows: I've copied the full sheet below for you.


Excel Workbook
ABCD
1EntitySheet Name
2
31FA6_210FA6_210PL_Workwear
41FA7_220FA6_210BS_Workwear
51FA8S_220FA6_210PL_Cleanroom
62FA89_230FA7_220PL_Workwear
73KK_230FA8S_220BS_Workwear
84ZE_240FA89_230PL_Cleanroom
95FA78_250KK_230PL_Workwear
1050KK_230BS_Workwear
1160ZE_240
1270FA78_250
1380
1490
15100
16110
17120
18130
19140
20150
21160
22170
2318 
2419 
2520 
Mapping


Thanks. :)
 
Upvote 0
Maybe using a Custom format in column B like

[=0]""

M.

Thanks Marcelo - that works great - can I create a dynamic range for Column B so that it only selects cells where there is a value in the cell (i.e. ignores the blank cells?)


Excel Workbook
ABCD
1**EntitySheet Name
2****
31FA6_210FA6_210PL_Workwear
41FA7_220FA6_210BS_Workwear
51FA8S_220FA6_210PL_Cleanroom
62FA89_230FA7_220PL_Workwear
73KK_230FA8S_220BS_Workwear
84ZE_240FA89_230PL_Cleanroom
95FA78_250KK_230PL_Workwear
105*KK_230BS_Workwear
116*ZE_240*
127*FA78_250*
Mapping



Thanks again :)
 
Upvote 0
see if it works for you.


Excel Workbook
ABCDEFG
1EntitySheet NameUnique list and sorted
21FA6_210FA6_210PL_WorkwearFA6_210
31FA7_220FA6_210BS_WorkwearFA7_220
41FA8S_220FA6_210PL_CleanroomFA78_250
52FA89_230FA7_220PL_WorkwearFA89_230
63KK_230FA8S_220BS_WorkwearFA8S_220
74ZE_240FA89_230PL_CleanroomKK_230
85FA78_250KK_230PL_WorkwearZE_240
950KK_230BS_Workwear
1060ZE_240
1170FA78_250
Sheet1
#VALUE!
</td></tr></table></td></tr></table>
 
Upvote 0
Apologies for my newbieness, but how do I add Names in Formulas (the "Applies to: =OFFSET(Sheet1!$C$2,,,COUNTA(Sheet1!$C:$C)-1)" bit?)?
 
Upvote 0
Excel 2003
Click on INSERT, Names, Define name

Name in the workbook box , enter the desired name
Refers to : copy the formula in that box, just make sure you reference the range correctly

That is , if the Entity in in column C and data starts in row 2 then the formula for the range will be:
=offset($C$2,,,counta($c:$C)-1)

hope it helps
 
Upvote 0
Hi,

Thank you for your response - I've tried the code in my spreadsheet, but it doesn't work as row 2 needs to contain a blank cell (i.e. blank as the initial starting cell for the dropdown list) so I think this might be causing it to break:


Excel Workbook
ABCDEFG
1EntitySheet NameUnique list
2 
31FA6_210FA6_210PL_Workwear 
41FA7_220FA6_210BS_Workwear 
51FA8S_220FA6_210PL_Cleanroom 
62FA89_230FA7_220PL_Workwear 
73KK_230FA8S_220BS_Workwear 
84ZE_240FA89_230PL_Cleanroom 
95FA78_250KK_230PL_Workwear 
105 KK_230BS_Workwear
116 ZE_240
127 FA78_250
Mapping



Can the formula be adjusted to allow the first blank? Thanks :)
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,729
Members
452,939
Latest member
WCrawford

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