+ Reply to Thread
Results 1 to 5 of 5

Two-way mirrored cells question

  1. #1
    Registered User
    Join Date
    06-30-2016
    Location
    Detroit, MI, USA
    MS-Off Ver
    2013
    Posts
    1

    Two-way mirrored cells question

    Hi everyone, and thanks in advance for your time and energy.

    I'm working on a project where each week I'm given an Excel file that's a dump of information from a database. I'm tasked with editing certain columns of information, but because the file is a straight dump from the database, the format isn't conducive for the kinds of edits I'm doing.

    What I want to do is take the information I need to edit and move it to another sheet in a more edit-friendly format, and have the cells mirror two-ways so that I can edit the cells on either the original sheet or the formatted sheet. In the attached example file, the sheet named "original" is a dummy example of the kind of data dump I get, and "edits" is how I would like the data to be formatted so I can do my edits. In this example file, I would want B2.original to mirror B9.edits, and vice versa. B3.original needs to mirror B28.edits, and so on and so forth.

    What I'm looking for is some code to get me started... I don't expect anyone to try to do all the mapping of cells, I'll do that myself, but I'm a complete novice when it comes to the VBA code here. I've searched the forums here and elsewhere, but most of what I've found is dealing with ranges, which I haven't been able to adapt to my particular scenario.

    Any help here would be really greatly appreciated. Thanks again in advance!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Re: Two-way mirrored cells question

    jdeviant,

    Firstly, Ranges are everything in Excel. Your range can be multiple cells across multiple rows and or multiple columns, or it can be a single cell.

    e.g. Range("A1")

    Ranges can be dynamic. e.g Range("A" & i), where i is a row
    Ranges can be cells e.g. Range.Cells(i,j), where i is a row and j is a column.
    Ranges can be named. e.g. Range("MyRange"),

    In your case, you are trying to convert data from a row to a column. For this,I might consider setting the row dimensions, which can then either be modified in an array, or transposed, or even looped. e.g.

    Please Login or Register  to view this content.
    Now you can imagine that rngMyRange only contains 1 row of data from column A to Column Z. With this, you can transform it, or you can loop the data so that column A = row 1, column B = row 2, and so forth.

    Use a For Next loop... For example:
    Please Login or Register  to view this content.
    Now this example doesn't put anything in order, and it doesn't take spaces in your rows into account. All you will see here is how the columns were transposed using ranges and loops. You could even loop through each row in the Original and make mulitple columns in the Edits sheet if you wanted.

    If you want things in specific places, you will need to be specific in your code about how you do that. But this should give you a good idea to start.

    Hope that helps
    Last edited by Journeyman3000; 07-10-2016 at 06:54 PM.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Two-way mirrored cells question

    Journeyman3000, your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Re: Two-way mirrored cells question

    Mod - there was no such # icon at the top of the post window. However, I have manually typed it. Cheers

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Two-way mirrored cells question

    Thank you. Just FYI it is located just above the edit window.

    Code tag # icon.jpg

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Linked/mirrored Data Validation
    By mcayea in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-12-2014, 01:09 PM
  2. Mirrored cells
    By Aivaras in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2013, 04:33 AM
  3. Creating a new row beneath the relevant row with mirrored data except for last few..
    By rastafasta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2012, 11:48 PM
  4. Colors determined by CF on one worksheet mirrored on subsequent worksheets using VBA?
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-28-2011, 12:24 PM
  5. Adding rows when cells are cloned/mirrored?
    By kmuirhead in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-31-2011, 06:01 AM
  6. Building a mirrored notification sheet?
    By Bscott05 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2010, 08:36 PM
  7. mirrored array/matrix
    By hierarchii in forum Excel General
    Replies: 3
    Last Post: 08-05-2005, 06:05 AM

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