+ Reply to Thread
Results 1 to 6 of 6

Formula to copy a row and mirror its cells

  1. #1
    Registered User
    Join Date
    06-24-2020
    Location
    Stuttgart, Germany
    MS-Off Ver
    2020
    Posts
    17

    Formula to copy a row and mirror its cells

    Hi,
    I have a row of values (let´s say from A1 to Z1) in my sheet "Sheet1". I am search now for a formula that copies this row to a my sheet "Sheet2" and mirrors the cells in this row, meaning that the cell A1 in "Sheet1" is the cell Z1 in "Sheet2", the cell B1 in "Sheet1" is the cell Y1 in "Sheet2", etc.
    Does anyone has an idea how to do this? Many thanks in advance.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Formula to copy a row and mirror its cells

    try this in Sheet2 A1:
    =INDEX(Sheet1!$A1:$Z1,27-COLUMNS($A1:A1))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    06-24-2020
    Location
    Stuttgart, Germany
    MS-Off Ver
    2020
    Posts
    17

    Re: Formula to copy a row and mirror its cells

    Hi benishiryo,
    thanks a lot for your reply. I tried your formula, but I just got a value in A1 of "Sheet2", whereas the other cells (i.e. B1, C1, etc.) were left blank. How could I handle this?

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Formula to copy a row and mirror its cells

    Here is a file that employs Ben's proposal. Seems to work as expected. If you are getting different results then it may help us trouble shoot if you could utilize the instructions in the banner at the top of the page to upload an .xlsx file that illustrates the issue.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    06-24-2020
    Location
    Stuttgart, Germany
    MS-Off Ver
    2020
    Posts
    17

    Re: Formula to copy a row and mirror its cells

    Hi JeteMc,
    thanks a lot for your reply. Your .xlsx file meets my problem pretty well. There is just one issue. In “Sheet2”, you plug in the formula in all cells between cell A and cell Z. However, I can just use cell A in “Sheet2” for a formula, but need to get values in all cells between cell A and cell Z. I have attached for this an .xlsx file. (Background for this: In “Sheet1”, the row has a dynamic length based on an underlying data source. Thus, the row always starts in cell A, but sometimes goes to cell Z and sometimes goes to cell BQ, etc.)
    Any idea how to solve this? Many thanks


    Your Message
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula to copy a row and mirror its cells

    Put this formula in A1 and copy it out to DZ1 ( i chose DZ1 as it seems to be greater than your maximum number of entries)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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. [SOLVED] Macro to mirror(copy) present sheet to new
    By Larbec in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 09-25-2015, 08:52 AM
  2. [SOLVED] Change Copy to Copy & Mirror Image the Copy
    By mills49 in forum Excel General
    Replies: 5
    Last Post: 08-21-2014, 05:25 AM
  3. Mirror cells - two worksheets, random cells. Attempted code provided
    By ld2x07 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-18-2014, 09:30 AM
  4. [SOLVED] how to create mirror copy of sheets
    By amarjeet.it in forum Excel General
    Replies: 5
    Last Post: 03-09-2013, 09:17 AM
  5. Mirror Cells
    By darksupernova in forum Excel General
    Replies: 7
    Last Post: 03-03-2010, 12:16 PM
  6. Duplicate / Mirror / Copy Worksheet
    By jhayes in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-11-2008, 08:27 AM
  7. A Mirror Copy of a Sheet with Different Outlook
    By munim in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2006, 04:10 PM

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