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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:25:45+00:00 2026-05-13T15:25:45+00:00

I have 2 sheets sheet1 and sheet2 in an excel 2007 file. In sheet2

  • 0

I have 2 sheets sheet1 and sheet2 in an excel 2007 file.

In sheet2 I have a column that is managed by a form/macro(with a tree view control). When an element has been selected, the cell is filled with an “x”, when it has been unselected, the cell is filled with “” (nothing).

In sheet1 I want to create a column equal to the sheet2 column.
So for example: if sheet2!C24 = “x” then sheet1!c24 should also be “x”
I also would like it to work both ways. If the user changes sheet1!c24 to “x”, then I want sheet2!c24 to take the same value.

Problems:
– in Sheet1, I tried sheet1!c24 = sheet2!c24, but then when sheet2!c24 = “”, sheet1!c24 displays 0 instead of nothing
– in Sheet2, I tried sheet2!c24 = sheet1!c24, but then the cells display the formula (=’sheet1!c24′) instead of the value…

So basically, what I want is that whatever change you do, in sheet1 or in sheet2, both columns in sheet1 and sheet2 are updated…
How can I achieve this?

  • 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-13T15:25:45+00:00Added an answer on May 13, 2026 at 3:25 pm

    What I think you need to do is use the Worksheet_Change events for both sheets and if a change is made in the column you are interested in, then you update the same cell in the other sheet.

    Something like this would go in the worksheet code module:

    Private Sub worksheet_change(ByVal target As Range)
        Dim c As Range
    
        'Test to see if the cell just changed is
        'in the column we are interested in
        Set c = Application.Intersect(target, Range("A:A"))
        If Not c Is Nothing Then
            'Copy across to other sheet
            If Not beingEdited Then
                beingEdited = True
                Sheet1.Range(target.Address) = target.Value
                beingEdited = False
            End If
        End If
    End Sub
    

    You’d need a beingEdited variable to be declared somewhere else with larger scope so that you could avoid the events triggering themselves and Excel getting stuck in a loop.

    In the other sheet you’d basically have the same procedure, except that it would reference the first worksheet, e.g. Sheet1.Range(target.Address) = target.Value.

    Obviously, you’d have to tweak this to your ranges/sheets.

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

Sidebar

Related Questions

I'll have an ASP.net page that creates some Excel Sheets and sends them to
I have Excel 2007 and Windows XP When this code runs: Columns(A:G).Select ActiveWorkbook.Worksheets(Sheet1).Sort.SortFields.Clear ActiveWorkbook.Worksheets(Sheet1).Sort.SortFields.Add
I have an excel sheet full of times. They are formatted so that they
I'm trying to create an OleDb connection to an Excel file that is located
I have an Excel 2007 workbook which I am using to connect to a
In Excel, i have sheets named after the working day. So, I don't have
I have this function that export a datagridView in Excel sheet : public void
VSTO 4.0 / Office 2007 In an Excel document-level automation project, I have a
I have the following code in VBA (which resides in an Excel 2007 Workbook):
We have an application that, amongst many other things, has an export to Excel

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.