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 8136873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:53:49+00:00 2026-06-06T10:53:49+00:00

I am trying to create a master list of several excel data that I

  • 0

I am trying to create a master list of several excel data that I have. I have never worked with Excel + VBA programs/codes.

There are 2 columns in WorkSheet1. The Column1 is some sort of word(s), terminology and the Column2 holds the definition for Column1. Now, I have to copy the definition of that Column1 and put in the Column2(if empty, if not, then in Column3 or the next empty column) in WorkSheet2 right next to the corresponding Column1. Continue doing this for the rest of the Rows in WorkSheet1. Basically, there should not be any repetition of the same values. The Column1 in WorkSheet2 can have more than 1 definition Columns, as long as they are not the same.

Does this make sense? Is it possible to do something like this?
Thanks in advance!

  • 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-06T10:53:54+00:00Added an answer on June 6, 2026 at 10:53 am

    Welcome to Excel VBA. If I understand your post correctly, this should give you (at the least basics of) what you are after. This may need to tweaking based on your specific workbook and data sets, but it will give you a GREAT start. There is a plethora of help available on all the methods / procedures I’ve used, and I’ve tried to comment well in English so you can understand what is happening.

    Option Explicit
    
    Sub MoveIt()
    
    Dim wkb As Workbook
    Set wkb = ActiveWorkbook 'change to your workbook reference
    
    Dim wks1 As Worksheet, wks2 As Worksheet
    Set wks1 = wkb.Sheets("Sheet1") 'change to your name / definition sheet
    Set wks2 = wkb.Sheets("Sheet2") 'change to the sheet where you need to paste defintions
    
    With wks1
    
        Dim rngLoop As Range, cel As Range
        'assumes row 1 as column header, and definitions in Column B (2)
        Set rngLoop = Intersect(.UsedRange, .UsedRange.Offset(1), .Columns(2)) 'basically all rows with definitions in Column 2
    
        For Each cel In rngLoop 'loop through each definition
    
    
            Dim rngFound As Range
    
            'look for associated definition name in 2nd sheet
            'assumes Name in Column 1 of both worksheets
            Set rngFound = wks2.Columns(1).Find(cel.Offset(, -1).Text, lookat:=xlWhole)
    
    
            If Not rngFound Is Nothing Then 'if the name is found
    
                'look to see if defintion already exists in row aligned with Name of 2nd sheet
                Dim rngFoundAgain As Range
                Set rngFoundAgain = rngFound.EntireRow.Find(cel.Text,lookat:=xlWhole)
    
                'if not found
                If rngFoundAgain Is Nothing Then
    
                    If rngFound.Offset(, 1) = vbNullString Then
                    'if next cell (row of rngFound, column B) is blank
    
                        rngFound.Offset(, 1) = cel.Text
    
                    Else
                    'go the right most cell and place definition in next column
    
                        rngFound.End(xlToRight).Offset(, 1) = cel.Text
    
                    End If
    
                End If
    
            End If
    
        Next
    
    End With
    
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to create Database as follows: USE Master GO IF NOT EXISTS(SELECT [Name] FROM
I'm trying to create a two column layout. the left column contains a list
I'm writing code that evaluates .NET Expression trees. I'm trying to create a C#
I am tryin gto understand branches in git.I have worked with SVN so trying
I'm trying to create a strongly typed partial view <%@ Page Title= Language=C# MasterPageFile=~/Views/Shared/Site.Master
I am trying to create a form in ASP.NET MVC2 RC 2 that is
I'm basically trying to create a linked list from a text file and add
What am I doing wrong? I am trying to create a simple master details
I am trying to create a database that can be used to store lots
I am trying to create a script that will take output of a system

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.