• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Compare two columns (A and B), in Column C, remove duplicated|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Compare two columns (A and B), in Column C, remove duplicated|General Excel Questions & Answers|Excel Forum|My Online Training Hub

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Compare two columns (A and B), in C…
sp_PrintTopic sp_TopicIcon
Compare two columns (A and B), in Column C, remove duplicated
Avatar
Tango Szeto
Member
Members
Level 0
Forum Posts: 10
Member Since:
January 12, 2023
sp_UserOfflineSmall Offline
1
January 20, 2023 - 11:31 am
sp_Permalink sp_Print sp_EditHistory

Hello again. I have another problem.

I have a set of dates in Column A, another set of dates in Column B, I want to compare this two column of dates, so that if any dates exists in Column B, it will not copy in Column C. So Column C basically are the dates from Column A, just that if any of the dates appear in both Column A and B, it will not show in Column C.

I try to use a vba to do it, but it didn't do the job. I attached my works for your information.

Any thoughts?

sp_PlupAttachments Attachments
  • sp_PlupImage 1.png (4 KB)
  • sp_PlupImage 1.png (4 KB)
sp_AnswersTopicSeeAnswer See Answer
Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 33
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
2
January 23, 2023 - 7:33 am
sp_Permalink sp_Print

Please reattach the file as a real attachment cannot download it as you have done now

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 848
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
3
January 23, 2023 - 7:34 am
sp_Permalink sp_Print sp_EditHistory

Hello,

Take a look at the Excel compare two lists blog post, it describes how to use Power Query to compare two lists.

Br,
Anders

Avatar
Tango Szeto
Member
Members
Level 0
Forum Posts: 10
Member Since:
January 12, 2023
sp_UserOfflineSmall Offline
4
January 23, 2023 - 11:26 pm
sp_Permalink sp_Print

Hello Anders, no joy, I try to use power query in my worksheet. But once I merge, all dates in column A still paste to the new column, even the date exists in column B.

Hi Hans, I upload my file again, please right click the link and select "save link as" if you are using chrome.

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 848
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
5
January 24, 2023 - 5:04 am
sp_Permalink sp_Print

Hello,

You didn't complete all the steps in Power Query.
See attached file for the finished version. There are two dates in column A that also exists in column C, those are removed.

Br,
Anders

Avatar
Tango Szeto
Member
Members
Level 0
Forum Posts: 10
Member Since:
January 12, 2023
sp_UserOfflineSmall Offline
6
January 24, 2023 - 12:17 pm
sp_Permalink sp_Print

Thanks Ander, I think is my version of excel. I understand that my previous attachment didn't finish the power query because when I try, the result didn't exclude that 2 days in the new sheet like yours.

When I open yours attachment and try to refresh the query. A warning box show up and said the power query is not compatible with my current version.

Anyway, I guess I know what is going on now.

Thank you very much indeed.

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 848
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
7
January 25, 2023 - 5:38 am
sp_Permalink sp_Print

Hello,

Well, if you are using an old version of Excel it might be that Power Query is not the right tool.
Attached is a variant where I use a helper column to get the dates list in a pivot table.

Br,
Anders

sp_AnswersTopicAnswer
Answers Post
Avatar
Tango Szeto
Member
Members
Level 0
Forum Posts: 10
Member Since:
January 12, 2023
sp_UserOfflineSmall Offline
8
January 25, 2023 - 10:44 pm
sp_Permalink sp_Print

Thank you so much on your nice work indeed Anders.
Good man!

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 170
Currently Online: James Hwang
Guest(s) 47
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1431
Anders Sehlstedt: 848
Velouria: 574
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 213
A.Maurizio: 202
Aye Mu: 201
Jessica Stewart: 185
Newest Members:
David Collins
Andras Marsi
Orimoloye Funsho
YUSUF IMAM KAGARA
PRADEEP PRADHAN
Vicky Otosnika
Abhishek Singh
Kevin Sojourner
Kara Weiss
And Woox
Forum Stats:
Groups: 3
Forums: 24
Topics: 6047
Posts: 26543

 

Member Stats:
Guest Posters: 49
Members: 31497
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Riny van Eekelen
© Simple:Press —sp_Information
  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
 
  • About My Online Training Hub
  • Contact
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Copyright © 2023 · My Online Training Hub · All Rights Reserved

Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.

Download A Free Copy of 100 Excel Tips & Tricks

excel tips and tricks ebook

We respect your privacy. We won’t spam you.

x