+ Reply to Thread
Results 1 to 6 of 6

Copy content from range in Sheet 1 to Sheet 2 keeping format of Sheet 2

  1. #1
    Registered User
    Join Date
    06-10-2021
    Location
    Netherlands
    MS-Off Ver
    Online 365
    Posts
    7

    Copy content from range in Sheet 1 to Sheet 2 keeping format of Sheet 2

    Hi,

    I've done some Googling and found some information, but nothing I could've used in my case. I've however found out I most likely can't reach my goal without VBA, hence I'm asking the question right here.

    What I'd like to do is copy contents from a range (B4:B999 (preferably up to the last cell containing data) in Sheet 1 into a range (A2:A999) in Sheet 2, preserving the format in Sheet 2.
    This needs to be done automatically as soon as new data is inputted into Sheet 1, no manual handling required at all. This document will be used by some non-tech-savvy people. Also, to make matters worse, it needs to be Web-Excel compatible.
    The formatting of the data inputted into Sheet 1 is unpredictable, so simply going to Sheet 2 and using =Sheet1!B4 in cell A2 is not an option.
    I've attached an example file.

    I'm new to VBA, so go on easy on me
    Attached Files Attached Files
    Last edited by iyvee; 11-28-2021 at 09:18 PM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Copy content from range in Sheet 1 to Sheet 2 keeping format of Sheet 2

    Couple of problems here...Perhaps your setup should be amended...
    First sheet is a range, second a table...blank table with many blank rows...
    Either have both as tables or both ranges...
    Web-Excel compatible.
    You mean Google sheets?...Vba is not compatible...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    06-10-2021
    Location
    Netherlands
    MS-Off Ver
    Online 365
    Posts
    7

    Re: Copy content from range in Sheet 1 to Sheet 2 keeping format of Sheet 2

    Quote Originally Posted by sintek View Post
    Couple of problems here...Perhaps your setup should be amended...
    First sheet is a range, second a table...blank table with many blank rows...
    Either have both as tables or both ranges...
    Unfortunately sheet 1 is raw data copy-pasted. The whole point of this document is to make a table which we can easily filter in.
    In the example I provided I'd like the data in Sheet 1, B4:B999 to be copiedo to A2:A999 in Sheet 2. I will do the same for Sheet1!D4:D999 to Sheet2!B2:B999 so that we can eventually filter the table in Sheet 2.

    Quote Originally Posted by sintek View Post
    You mean Google sheets?...Vba is not compatible...
    No, like Office 365 Excel online, using SharePoint.
    I'm using the desktop version to make this file, but will have to upload it to SharePoint for all my co-workers to use.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Copy content from range in Sheet 1 to Sheet 2 keeping format of Sheet 2

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,074

    Re: Copy content from range in Sheet 1 to Sheet 2 keeping format of Sheet 2

    No, like Office 365 Excel online
    The online version of Office does not support VBA. You're co-workers would need to open the file in the desktop app.

  6. #6
    Registered User
    Join Date
    06-10-2021
    Location
    Netherlands
    MS-Off Ver
    Online 365
    Posts
    7

    Re: Copy content from range in Sheet 1 to Sheet 2 keeping format of Sheet 2

    Thanks for the effort folks. Seeing as the online version doesn't support VBA and the only way to achieve what I want is with VBA (Sintek, your code came really close to that, thanks) it's not gonna be possible.

+ 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] copy sheet while keeping column widths and row heights the same as the master sheet.
    By ANDREAAS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2019, 02:28 AM
  2. Copy Formula To New Sheet Keeping Reference to First Sheet
    By WickedxJosh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2018, 10:32 AM
  3. copy content sheet from one workbook to another if sheet has the same name
    By rickmeister in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2017, 08:02 AM
  4. copy all content of one sheet into another sheet in excel
    By merQrey in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-19-2015, 04:27 AM
  5. [SOLVED] VBA to check values from one sheet and copy only content to another sheet
    By skipperfoto in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-27-2014, 12:46 PM
  6. [SOLVED] Clear Content in one sheet and copy & paste value from another sheet
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2013, 11:23 AM
  7. [SOLVED] match content of one sheet cell range to another in a different sheet
    By StrydomM in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2013, 04:17 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