Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8890691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:33:36+00:00 2026-06-14T22:33:36+00:00

Two nonadjacent columns, Column A and C, contain strings and Column E (again nonadjacent)

  • 0

Two nonadjacent columns, Column A and C, contain strings and Column E (again nonadjacent) should contain the duplicate strings between Column A and C.

Now my main problems is that Columns A and C are different lengths and the duplicates aren’t per se on the same row.

When not using VBA, the following input Column E gives the solution except for the blanks.

=IF(ISERROR(MATCH(A1,$C:$C,0)),"",A1)  

For example:
Column A
potatoe
tomatoe
broccoli
pepper
mushroom

Column C
mushroom
cucumber
broccoli
salt
fennel

Column E should be
mushroom
broccoli

This is what I’ve been able to find so far, but it is very wrong. I just find myself unable to breakdown the issue.

Sub Duplicates()
  Dim duplicates As Range
  Set duplicates = Columns("A", "C")
  activesheet.duplicates.Copy Destination:=activesheet.Range("E1")
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:33:37+00:00Added an answer on June 14, 2026 at 10:33 pm

    … Try this:

      Sub PopulateColE()
    
         Dim cl As Range
         Dim CurrentRow As Integer: CurrentRow = 1
    
         On Error Resume Next
    
         For Each cl In Intersect(ActiveSheet.UsedRange, ActiveSheet.Range("C:C"))
            Application.WorksheetFunction.Match cl.Value, Range("A:A"), 0
    
            If Err.Number = 0 Then
               Range("E" & CurrentRow).Value = cl.Value
               CurrentRow = CurrentRow + 1
            End If
    
            Err.Clear
         Next cl
      End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Two problems, that probably are related: I'm retreiving a number of 'persons' from a
Two questions about <list-index...> : Is it necessary that values of column given in
Two column layouts are quite common and until now I implement it as outlined
Two trees are said to be identical if they contain same set of elements
Two days ago I spontaneously bought myself a domain. The day before that, I
Two tables. I have column a (datetime type) and column b (numeric type) in
Two questions: 1) There are several tables that are used as an archive for
Two questions here, hope that is OK. First, and mainly, I am trying to
Two questions here. My view has a close button that when clicked, the window
Two points -- first, the example is in Fortran, but I think it should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.