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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:17:43+00:00 2026-05-26T12:17:43+00:00

I have no experience when it comes to this type of query and i’m

  • 0

I have no experience when it comes to this type of query and i’m stuck.

I’ve found a working query that i have used, here is the logic:

“If any cell in Sheet2 Column A = Any cell in Sheet1 Column B, change sheet2 column A cell value to sheet1 column A value”

The formula for this is:

Sub Test1()
Application.ScreenUpdating = False
Dim cell As Range, varFind As Variant
With Sheets("Sheet1")
For Each cell In Sheets("Sheet2").Columns(1).SpecialCells(2)
Set varFind = .Columns(2).Find(What:=cell.Value, LookIn:=xlFormulas, LookAt:=xlWhole)
If Not varFind Is Nothing Then cell.Value = .Cells(varFind.Row, 1).Value
Set varFind = Nothing
Next cell
End With
Application.ScreenUpdating = True
End Sub

That works fine for me, but I need it slightly different. It needs to follow this logic:

“If any cell in Sheet2 Column A = Any cell in Sheet1 Column B, change sheet1 column A cell value to sheet2 column B value”

Can anyone help please?

  • 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-05-26T12:17:43+00:00Added an answer on May 26, 2026 at 12:17 pm

    [updated as I had needed to change the column on sheet 2 from A to B]

    As you have writen this you would simply change this line

    If Not varFind Is Nothing Then cell.Value = .Cells(varFind.Row, 1).Value

    to

    If Not varFind Is Nothing Then .Cells(varFind.Row, 1).Value = cell.Offset(0,1).Value

    There is scope to improve this code speed if performance is an issue. Plus you will have a potential code bust if there are no constant cells in sheet 2 column B for SpecialCells to look at …. pls advise if you’d like the code tweaked further

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

Sidebar

Related Questions

I'm looking into this clock. I have no experience with the js that comes
I am pretty new to WCF in general. What little experience I have comes
Anyone have experience with this plugin? I have it installed but I have no
anyone have experience doing this? when i say imaginary i mean the square root
Anyone have experience playing audio (right now specifically mp3s) with python using a any
I don't have any experience building software for Windows but I have experience with
EDIT : This has begun working and I have not changed anything, this is
So i have this crash log from my application. I don't have much experience
I have very little experience with compression algorithms; my experience just comes from running
This is the code that is working but not the way i need it

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.