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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:52:09+00:00 2026-06-10T16:52:09+00:00

I have a workbook with three worksheets. I need to change the value in

  • 0

I have a workbook with three worksheets. I need to change the value in column K(row) on workbook B with the value of column CF(row) from workbook A based on a criteria (index?) of columns A and C on Workbook A and columns B and D on worksheet B. That is, these worksheets have the data in a DIFFERENT ORDER, one cannot simply loop through and copy over. I need to find the Row number of the CF(row) in worksheet A where the worksheet A and C columns are the same as the worksheet A B and D columns.

PsuedoSQL

UPDATE 
    Worksheet B
SET
    Worksheet B.K = Worksheet A.CF
FROM
    Worksheet A
WHERE
    Worksheet A.B = Worksheet B.B

Select from Worksheet A, column CF WHERE A.A AND A.C is equal to worksheet B.B and B.D AND SET Worksheet B.K(Row) to Value worksheetA.CF(row)

The code I have is a look up that finds the LAST column with the matching text on worksheet A Column A, without any index or mapping.

Public Function FindPnum(keyword As Variant) As Variant
    Dim ws As Worksheet
    Dim rng1 As Range
    Dim rng2 As Range
    Dim tRow As Long
    Dim tCol As Integer

    Set ws = Sheets("Data")
    Set rng1 = ws.Cells.Find(keyword, ws.[b2], xlValues, , xlByRows, xlPrevious)
    Set rng2 = ws.Cells.Find(keyword, ws.[b2], xlValues, , xlByColumns, xlPrevious)

    If Not rng1 Is Nothing Then
        FindPnum = Cells(rng1.Row, rng2.Column).Address(0, 0)
    End If

End Function
  • 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-10T16:52:10+00:00Added an answer on June 10, 2026 at 4:52 pm

    Here try this

    Sub pair()
    Dim r, r2, found
    r = 8
    r2 = 2
    found = False
    Application.ScreenUpdating = False
    Sheets(2).Activate
    Do Until Len(Cells(r, 2).Value) = 0
    Do Until Len(Sheets(1).Cells(r2 + 1, 2).Value) = 0 Or found = True
        If Sheets(2).Cells(r, 2).Text = Sheets(1).Cells(r2, 2).Text Then
            If Sheets(2).Cells(r, 11).Value <> 0 Then
                Sheets(2).Cells(r, 11).Value = Sheets(1).Cells(r2, 84)
            End If
            found = True
        Else
            r2 = r2 + 1
        End If
    Loop
    r2 = 2
    r = r + 1
    found = False
    Loop
    Application.ScreenUpdating = True
    End Sub
    

    I think this should do it.

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

Sidebar

Related Questions

I have a workbook with three worksheets titled FY09, FY10, and FY11. I need
I have a three column workbook with the following data: Col A: Names Col
I have an excel workbook which needs to query data from an HTTP server.
I have an Excel Workbook that has several worksheets in it. The tables in
I have an Excel Workbook which has some VSTO-based c# code. Given a known
I have a Excel Workbook that I use as a report template. I change
I have a VBA publishing macro in Excel which generates a published workbook based
So, in a Workbook, I have two worksheets: One has a table full of
I have an existing worksheet StudentSheet1 which I need to add as many times
I have a worksheet, in where I need a search that does more than

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.