• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 10:01
CEST 16:01
KST 23:01
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Maestros of the Game: Week 1/Play-in Preview5[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9
Community News
Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris38Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195
StarCraft 2
General
#2: Serral - Greatest Players of All Time 2024/25 Off-Season Roster Moves #1: Maru - Greatest Players of All Time Maestros of the Game: Week 1/Play-in Preview Greatest Players of All Time: 2025 Update
Tourneys
LiuLi Cup - September 2025 Tournaments $5,100+ SEL Season 2 Championship (SC: Evo) Maestros of The Game—$20k event w/ live finals in Paris Kirktown Chat Brawl #8 - 4.6K max Tonight LiuLi Cup - August 2025 Tournaments
Strategy
Custom Maps
External Content
Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below
Brood War
General
Post ASL20 Ro24 discussion. BGH Auto Balance -> http://bghmmr.eu/ Easiest luckies way to get out of Asl groups BW General Discussion No Rain in ASL20?
Tourneys
[ASL20] Ro24 Group F [IPSL] CSLAN Review and CSLPRO Reimagined! Small VOD Thread 2.0 Cosmonarchy Pro Showmatches
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
General RTS Discussion Thread Warcraft III: The Frozen Throne Path of Exile Mechabellum Nintendo Switch Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s) Gtx660 graphics card replacement
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
How Culture and Conflict Imp…
TrAiDoS
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 644 users

Excel Pros Please Help!

Blogs > Golgotha
Post a Reply
1 2 3 Next All
Golgotha
Profile Blog Joined January 2011
Korea (South)8418 Posts
December 15 2011 19:01 GMT
#1
I've been asking around but I haven't got any answers. I know this community is very technically proficient and intelligent, so I come to you. I understand that this is random but please help!

I have been given the task to clean up a contact list of a survey of over 6,000 people! Some of them are duplicate names or emails so they must be removed. HOWEVER, the problem is that I cannot simply delete a duplicate name or email because the email or name might be a duplicate but the cell phone numbers are different! Thus, I am required to combine both cell phone numbers under the cell phone column FIRST before I delete the duplicate.

Here is an example to clearly convey the issue:
[image loading]

In this example, we have two duplicate names (yes, people can have the same names but in this case imagine that they are the same person listed twice), Mark and DJ. I need to delete one, but before I do I need to make sure I am not deleting vital information in the process. In this case they have two different cell phone numbers but they are not collected under one name. I need to keep the two different cell phone numbers and then delete the duplicate names.

The thing is I can do it manually but it would take me forever to go over the hundreds of duplicates in the Excel. I am looking for the most efficient way to tackle this problem. I hope it is okay that I ask this in my blog. I know we have a General Tech but I am pretty sure I can't ask Excel questions as that would be blasphemous in a gaming forum.

Thanks for listening!

zeks
Profile Blog Joined September 2007
Canada1068 Posts
December 15 2011 19:08 GMT
#2
Does this help

http://office.microsoft.com/en-us/excel-help/delete-duplicate-rows-from-a-list-in-excel-HA001034626.aspx
"Two roads diverged in a wood, and I-- I took the one less traveled by, And that has made all the difference."
Torte de Lini
Profile Blog Joined September 2010
Germany38463 Posts
Last Edited: 2011-12-15 19:09:44
December 15 2011 19:09 GMT
#3
Why don't you just filter or alphabetise the names and then just remove them manually if you see double?

http://www.google.ca/search?q=how to remove duplicate cells excel&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
https://twitter.com/#!/TorteDeLini (@TorteDeLini)
Glacierz
Profile Blog Joined May 2010
United States1244 Posts
December 15 2011 19:10 GMT
#4
On December 16 2011 04:09 Torte de Lini wrote:
Why don't you just filter or alphabetise the names and then just remove them manually if you see double?

http://www.google.ca/search?q=how to remove duplicate cells excel&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a


I think you missed the 6000 part.

OP, I don't suppose you know any VBA?
Chill
Profile Blog Joined January 2005
Calgary25981 Posts
December 15 2011 19:11 GMT
#5
I use Excel a llllllllllloooooooooooooooottttttttttttttt and you should just sort and do it manually. No other method is going to be 100% accurate if you can't be sure of how your data is formatted.
Moderator
Golgotha
Profile Blog Joined January 2011
Korea (South)8418 Posts
December 15 2011 19:12 GMT
#6
On December 16 2011 04:09 Torte de Lini wrote:
Why don't you just filter or alphabetise the names and then just remove them manually if you see double?

http://www.google.ca/search?q=how to remove duplicate cells excel&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a


I tried this but I was not getting anywhere because there were so many different categories to change and combine (the cell phone was just simple example) and there are over 700 duplicates.
Chill
Profile Blog Joined January 2005
Calgary25981 Posts
December 15 2011 19:13 GMT
#7
On December 16 2011 04:10 Glacierz wrote:
Show nested quote +
On December 16 2011 04:09 Torte de Lini wrote:
Why don't you just filter or alphabetise the names and then just remove them manually if you see double?

http://www.google.ca/search?q=how to remove duplicate cells excel&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a


I think you missed the 6000 part.

OP, I don't suppose you know any VBA?

I know VBA. What do you need help with specifically?
Moderator
Golgotha
Profile Blog Joined January 2011
Korea (South)8418 Posts
December 15 2011 19:14 GMT
#8
On December 16 2011 04:11 Chill wrote:
I use Excel a llllllllllloooooooooooooooottttttttttttttt and you should just sort and do it manually. No other method is going to be 100% accurate if you can't be sure of how your data is formatted.


Thanks Chill, I guess I just better get started and chip away.

On December 16 2011 04:08 zeks wrote:
Does this help

http://office.microsoft.com/en-us/excel-help/delete-duplicate-rows-from-a-list-in-excel-HA001034626.aspx


Yeah I know how to remove duplicates, that is the easy part
Glacierz
Profile Blog Joined May 2010
United States1244 Posts
December 15 2011 19:15 GMT
#9
When you say duplicate, are the content in both cells exactly the same? as in if I did something like "=IF(A1=A2, 1, 0) it would return 1?
Chill
Profile Blog Joined January 2005
Calgary25981 Posts
Last Edited: 2011-12-15 19:17:18
December 15 2011 19:16 GMT
#10
Oh okay I just saw what you're looking for (imgur is blocked at work, saw on my phone).

Basically you want to have a unique list of names and then add the other fields together? PM me the file I'll write you a script.

The problem you're going to have is formatting consistency. If someone has John Smith and another one is john smith and lastly smith, john they're all going to be different.

If your data is formatted uniformly then I can do it. Otherwise, manually is the best.
Moderator
TheMango
Profile Joined April 2007
United States1967 Posts
December 15 2011 19:16 GMT
#11
I can't see the image, since imgur is blocked at work, but I'm sure there's a way to automate it. I'll take a look when I get home.
Moderator
Golgotha
Profile Blog Joined January 2011
Korea (South)8418 Posts
December 15 2011 19:18 GMT
#12
On December 16 2011 04:15 Glacierz wrote:
When you say duplicate, are the content in both cells exactly the same? as in if I did something like "=IF(A1=A2, 1, 0) it would return 1?


Yes, some of the content in two different cells might be exactly-exactly the same but it does not mean that the other information in corresponding row are the same as well. They can be different and so I must combine those differences into one row and match it with just one name.
Iranon
Profile Blog Joined March 2010
United States983 Posts
Last Edited: 2011-12-15 19:19:36
December 15 2011 19:19 GMT
#13
Isn't there a way to use the A-Z row sort function such that the columns stay locked? (or vice versa) If you did that, then you could just merge all the duplicate names.

That's all that's needed, and with all the crazy functions Excel has I would be shocked if that wasn't possible.
Glacierz
Profile Blog Joined May 2010
United States1244 Posts
December 15 2011 19:19 GMT
#14
With VBA, you can write a nested loop after the names are sorted in alphabetical order. You keep an expanding collection of phone numbers that are unique and check with the list with every iterative step.

If the data set is well behaved, you can even do this in MATLAB, which contains the function union(), that accomplishes what you are trying to do in 1 line of code.
OpticalShot
Profile Blog Joined October 2009
Canada6330 Posts
December 15 2011 19:20 GMT
#15
Uh, a quick approach off the top of my head:

1) sort A->Z based on names (keep # column in the same selection so it's sorted along... you know this part right)
2) run a simple macro to check name cells and remove if same as previous (gets rid of duplicate names)
3) run a macro to check number cells and if the pair name cell is empty (duplicate), then append current cell with the previous cell. you may need to do some extra work to make sure excel treats the number cell as "general" or "text" not "number", or you may run into errors.
4) run a macro to remove rows if name cell is empty
-> sorted list with no duplicate names and no loss of numbers
[TLMS] REBOOT
Glacierz
Profile Blog Joined May 2010
United States1244 Posts
December 15 2011 19:21 GMT
#16
On December 16 2011 04:16 Chill wrote:
Oh okay I just saw what you're looking for (imgur is blocked at work, saw on my phone).

Basically you want to have a unique list of names and then add the other fields together? PM me the file I'll write you a script.

The problem you're going to have is formatting consistency. If someone has John Smith and another one is john smith and lastly smith, john they're all going to be different.

If your data is formatted uniformly then I can do it. Otherwise, manually is the best.


If it is just capitalization that can be taken care of easily. There's a VBA function that converts all char to lower or upper case.
Golgotha
Profile Blog Joined January 2011
Korea (South)8418 Posts
December 15 2011 19:23 GMT
#17
On December 16 2011 04:16 Chill wrote:


Basically you want to have a unique list of names and then add the other fields together? PM me the file I'll write you a script.
.


Yes, exactly what I was looking for!!! But I have no idea how to do it.

Wow, that is very kind of you, but I doubt my prof would let me since this a list of confidential contact info! Hehe people would be pissed at me. Is there a resource or tutorial online that I could study to tackle this problem? Thanks again.
Chill
Profile Blog Joined January 2005
Calgary25981 Posts
December 15 2011 19:23 GMT
#18
On December 16 2011 04:20 OpticalShot wrote:
Uh, a quick approach off the top of my head:

1) sort A->Z based on names (keep # column in the same selection so it's sorted along... you know this part right)
2) run a simple macro to check name cells and remove if same as previous (gets rid of duplicate names)
3) run a macro to check number cells and if the pair name cell is empty (duplicate), then append current cell with the previous cell. you may need to do some extra work to make sure excel treats the number cell as "general" or "text" not "number", or you may run into errors.
4) run a macro to remove rows if name cell is empty
-> sorted list with no duplicate names and no loss of numbers

Yea I have a similar solution.

Run macro that:
1) Sorts A->Z based on names
2) Loops through and checks if n name is the same as n+1 name.
2a) If it is, checks if all n+1 data is unique. If it is, appends it to the n data. If it isn't, skip.
2b) Deletes row n+1
2c) Rechecks row n vs new row n+1
2d) n++ until blank
Moderator
Golgotha
Profile Blog Joined January 2011
Korea (South)8418 Posts
Last Edited: 2011-12-15 19:36:14
December 15 2011 19:32 GMT
#19
On December 16 2011 04:20 OpticalShot wrote:
Uh, a quick approach off the top of my head:

1) sort A->Z based on names (keep # column in the same selection so it's sorted along... you know this part right)
2) run a simple macro to check name cells and remove if same as previous (gets rid of duplicate names)
3) run a macro to check number cells and if the pair name cell is empty (duplicate), then append current cell with the previous cell. you may need to do some extra work to make sure excel treats the number cell as "general" or "text" not "number", or you may run into errors.
4) run a macro to remove rows if name cell is empty
-> sorted list with no duplicate names and no loss of numbers


Yes, I know how to sort but I am lost when it comes to running macros. Are macros similar to the functions within excel?

edit: Learning about how to make a macro right now. I'll do my best.
mrafaeldie12
Profile Joined July 2011
Brazil537 Posts
Last Edited: 2011-12-15 19:42:53
December 15 2011 19:36 GMT
#20
for(int i = 0;i<cells.length();i++){
for(int j=1 + i;j<cells.length();j++){
if(name[i].trim() == name[j].trim() && phone[i].trim() == phone[j].trim()){
//delete the row corresponding to name[j]
}
}
}

I don't know how to make macros in excel but I hope that helps

EDIT:Thanks Glacerz <3
"..it all comes thumbling down thumbling down thumblin down"
1 2 3 Next All
Please log in or register to reply.
Live Events Refresh
SC Evo League
12:00
S2 Championship: Playoffs D2
SteadfastSC379
IndyStarCraft 205
BRAT_OK 99
3DClanTV 58
EnkiAlexander 48
IntoTheiNu 16
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 379
IndyStarCraft 205
BRAT_OK 99
StarCraft: Brood War
Britney 62877
Bisu 1370
Jaedong 1061
firebathero 831
Mini 690
Hyuk 671
BeSt 492
Barracks 222
ggaemo 207
Hyun 151
[ Show more ]
Last 151
hero 123
Movie 103
Mind 96
Mong 78
Pusan 70
Leta 70
sSak 68
PianO 68
Sea.KH 54
Free 51
ToSsGirL 44
sas.Sziky 24
Backho 23
zelot 22
Yoon 20
soO 20
yabsab 16
SilentControl 9
Noble 8
NaDa 6
Dota 2
Gorgc5785
qojqva2737
Dendi1194
XcaliburYe327
Fuzer 163
syndereN149
Counter-Strike
fl0m2318
ScreaM1197
zeus735
oskar129
edward59
Heroes of the Storm
Liquid`Hasu412
Other Games
B2W.Neo3817
singsing2143
Hui .246
SortOf125
KnowMe108
Organizations
Other Games
gamesdonequick836
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• Hinosc 29
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota283
Other Games
• WagamamaTV241
Upcoming Events
Maestros of the Game
1h 59m
SHIN vs Creator
Astrea vs Lambo
Bunny vs SKillous
HeRoMaRinE vs TriGGeR
BSL Team Wars
4h 59m
Team Bonyth vs Team Sziky
BSL Team Wars
4h 59m
Team Dewalt vs Team Sziky
Afreeca Starleague
19h 59m
Soulkey vs BeSt
Snow vs Light
Monday Night Weeklies
1d 1h
Replay Cast
1d 9h
Sparkling Tuna Cup
1d 19h
PiGosaur Monday
2 days
LiuLi Cup
2 days
Replay Cast
3 days
[ Show More ]
The PondCast
3 days
RSL Revival
3 days
Maru vs SHIN
MaNa vs MaxPax
RSL Revival
4 days
Reynor vs Astrea
Classic vs sOs
BSL Team Wars
5 days
Team Bonyth vs Team Dewalt
CranKy Ducklings
5 days
RSL Revival
5 days
GuMiho vs Cham
ByuN vs TriGGeR
Cosmonarchy
5 days
TriGGeR vs YoungYakov
YoungYakov vs HonMonO
HonMonO vs TriGGeR
[BSL 2025] Weekly
6 days
RSL Revival
6 days
Cure vs Bunny
Creator vs Zoun
Liquipedia Results

Completed

Acropolis #4 - TS1
WardiTV Summer 2025
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 2
Maestros of the Game
SEL Season 2 Championship
Sisters' Call Cup
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSL 2025 AUTUMN (S18)
LASL Season 20
2025 Chongqing Offline CUP
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
EC S1
BLAST Rivals Fall 2025
Skyesports Masters 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
FISSURE Playground #2
BLAST Open Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.