+ Reply to Thread
Results 1 to 12 of 12

Data Replication

  1. #1
    Forum Contributor
    Join Date
    07-16-2008
    Location
    USA
    Posts
    142

    Data Replication

    Example: On Sheet1, I have columns A, B & C with data. On Sheet2, I'd like to replicate only columns B & C from Sheet1 without manually copying and pasting and without making every cell on Sheet2 equal Sheet1. Is there any way to achieve this? When new data is entered on Sheet1, it should auto update on Sheet2 as well.

    I know I can achieve this by making every cell on Sheet2 equal Sheet1 for columns B & C, but that doesn't seem to be the best way to do this, or is it?
    Last edited by mcmuney; 11-01-2010 at 01:37 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Data Replication

    You mean something like this:

    In B1 of second sheet:

    =IF(Sheet1!B1="", "", Sheet1!B1)

    Hint: You can't just use =Sheet1!B1 because you'll get 0's where suppose to get blanks

  3. #3
    Forum Contributor
    Join Date
    07-16-2008
    Location
    USA
    Posts
    142

    Re: Data Replication

    I'm actually trying to avoid using a formula, if at all possible. But if that's the only way, I don't really need an if/then statement, I can simply just make it: =Sheet1!B1

    I was wondering if there's a macro/vba that can achieve this.

    Quote Originally Posted by zbor View Post
    You mean something like this:

    In B1 of second sheet:

    =IF(Sheet1!B1="", "", Sheet1!B1)

    Hint: You can't just use =Sheet1!B1 because you'll get 0's where suppose to get blanks

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Data Replication

    I'm not a good with macro's but this might help:

    If you want always to copy-paste columns B and C into new sheet you can use this:

    Please Login or Register  to view this content.
    And if you want to copy selection and paste into new sheet you can try with this:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Data Replication

    Without seein the data it's difficult to say, but a PivotTable might work
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    07-16-2008
    Location
    USA
    Posts
    142

    Re: Data Replication

    I'm hoping for something that will auto update real-time. For example, if I add new data on Sheet1, on a new row on columns B & C.. when I switch over to Sheet2, I will see the new data instantly.

    royUK: I'm not sure why the type of data would be relevant to what I'm trying to do??? Regardless of the type of data, it could copy it over.

    So far, the copy/paste macro seems to be the best option. Is there a better VBA option that's more automatic?

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Data Replication

    Hello,

    you could use a change event macro that copies every cell from Sheet1 as soon as it is entered. Right-click the sheet tab of Sheet1, click View Code and paste this code into the code window:

    Please Login or Register  to view this content.
    Or you could use a macro that copies columns B and C from Sheet1 to Sheet2 whenever Sheet2 is selected.

    For the latter, right-click the sheet tab for Sheet2, select View Code and paste the following code into the code window.

    Please Login or Register  to view this content.

    cheers
    Last edited by teylyn; 11-01-2010 at 03:57 AM.

  8. #8
    Forum Contributor
    Join Date
    07-16-2008
    Location
    USA
    Posts
    142

    Re: Data Replication

    The latter is the perfect solution, but there's one other criteria.. I need it to copy over those columns ONLY if a criteria is met on ColumnA (for each row) on Sheet1. For example, if ColumnA equals 1,2 or 3, then copy over the data of Columns B:C.
    Last edited by teylyn; 11-01-2010 at 04:31 PM. Reason: removed quote

  9. #9
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Data Replication

    mcmuney,

    please don't quote whole posts. It just clutters up the forum.

    Also, it would be a lot easier if you set out your complete requirements from the start. Now, please mock up a workbook with some dummy data in Sheet1 and manually enter what you would like to see in Sheet2. Then attach that file to a new response to this thread.

    cheers,

  10. #10
    Forum Contributor
    Join Date
    07-16-2008
    Location
    USA
    Posts
    142

    Re: Data Replication

    Here's a mockup file. On Shee2, it should replicate columns B, C & E WHERE A = 1, 2 or 3.

    Quote Originally Posted by teylyn View Post
    mcmuney,

    Now, please mock up a workbook with some dummy data in Sheet1 and manually enter what you would like to see in Sheet2. Then attach that file to a new response to this thread.

    cheers,
    Attached Files Attached Files

  11. #11
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Data Replication

    mcmuney, I'll write this very slowly to make sure you understand:

    Don't quote whole posts. In fact, only quote if it is required to point out what part of what post you are replying to. There is no need to quote all (or most) of the previous post in the next reply.

  12. #12
    Forum Contributor
    Join Date
    07-16-2008
    Location
    USA
    Posts
    142

    Re: Data Replication

    Should I assume this isn't doable? To incorporate an if inlist statement to the copy macro?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1