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

  • SEARCH
  • Home
  • 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 8697767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:36:00+00:00 2026-06-13T01:36:00+00:00

I have two worksheets. The first worksheet has a project number and project name.

  • 0

I have two worksheets. The first worksheet has a project number and project name. The second worksheet also has a project number and a project name. The project name in the first worksheet is incorrect and needs to be updated with the project name from the second worksheet. So:

Worksheet 1:
ProjectId     ProjectName
1             Apple
2             Orange
3             Banana

Worksheet 2:
ProjectId     ProjectName
1             Chicken
2             Bacon
3             Beef

I need to create a macro that simply runs through the rows in Worksheet 2, matches to worksheet 1 based on the Project ID, and then just updates the ProjectName in worksheet 1 with the ProjectName from worksheet 2.

How can I use VBA to iterate through the rows, match on ProjectID, and update the ProjectNames in Worksheet 1 with the ProjectNames from Worksheet 2?

  • 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-13T01:36:01+00:00Added an answer on June 13, 2026 at 1:36 am

    As stated by Eduardo, just use VLOOKUP like this:

    • Replace the content of ProjectName on Worksheet 1 by a function similar to this one (but adapted to your specific workbook):

    =VLOOKUP(A2, sheet2!$A$2:$B$100, 2, 0)

    Then just drag this formula down. If this is final you may want to copy and then paste special with values only so that this data remains unchanged afterwards.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two sheets, the first pulls the data from the second to print
I have two bits of code. First a standard copy paste from cell A
I have two classes (MVC view model) which inherits from one abstract base class.
I have two worksheets in Excel. One is a mapping, for example A Aardvark
First off this is in Microsoft Office 2010. I'm comparing two different worksheets each
I have two worksheets, one which is used to filter the other. Using VBA
I have an Excel project which contains 3 worksheets, namely Unhealthy Foods Healthy Foods
i have a chart from two columns. In Column A are some result %
I have a Microsoft Excel worksheet that has hundreds of rows of items. The
I have two excel files each with a single worksheet. I want to take

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.