+ Reply to Thread
Results 1 to 8 of 8

Transferring multiple rows o data to another sheet, but only put the header row in 1 time.

  1. #1
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Transferring multiple rows o data to another sheet, but only put the header row in 1 time.

    Hello!

    I have a sheet with 33 columns of data that is divided up by Order Number. Each Order Number section has the exact same header row. I've made a macro that transfers all the data to a second sheet, but my current code also tranfers the header row on the second sheet above each order number section. I only need the header row on the second sheet one time.

    Is there a way to, before the main part of the macro runs, have it enter the header row titles across row 3 on the second sheet in one shot without having to specify each of the 33 columns?

    Thanks!

    Jenny
    Last edited by zookeepertx; 05-30-2018 at 11:59 AM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transferring multiple rows o data to another sheet, but only put the header row in 1 t

    Something like this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Transferring multiple rows o data to another sheet, but only put the header row in 1 t

    Oh dear - I'm sorry! I completely mis-stated my problem!

    The words in the header row consist of words picked out from different places on sheet 1. I can either copy/paste them individually or just have the macro enter the header title into each cell. But, in either case I'd have to specify each cell across the 33 columns individually:
    Range("Sheet2!A" & r).Value = "Order"
    Range("Sheet2!B" & r).Value = "Ship to"
    etc, etc.

    Can I do that without having to specify every, single cell (A & r), (B & r), etc all the way across the 33 columns?

    I TOTALLY don't understand Arrays, but could that help?

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transferring multiple rows o data to another sheet, but only put the header row in 1 t

    The headers for the columns are in a different order on the "two" sheets?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Transferring multiple rows o data to another sheet, but only put the header row in 1 t

    Quote Originally Posted by xladept View Post
    The headers for the columns are in a different order on the "two" sheets?
    Yes; this is quite possibly the STUPIDEST report I've ever seen in my life!!

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Okay, here's a very shortened version, just showing 1 order. (The colors on the "desired results" sheet are not needed. I just put them there as a visual aid for myself. I need all the help I can get, LOL!). You'll notice that all the raw data is in Column A. This has been a trial because there are NO tabs in between data "blocks" - just spaces - so no way to do text-to-columns. Even going with spaces, they're so inconsistent, that it still comes out all kinds of wrong!
    As I said: stupidest report EVER!
    Attached Files Attached Files
    Last edited by zookeepertx; 05-30-2018 at 01:15 PM.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transferring multiple rows o data to another sheet, but only put the header row in 1 t

    For the headers only:

    Please Login or Register  to view this content.
    *You only wanted code for the headers - right!
    Last edited by xladept; 05-30-2018 at 03:00 PM.

  7. #7
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Transferring multiple rows o data to another sheet, but only put the header row in 1 t

    Quote Originally Posted by xladept View Post
    *You only wanted code for the headers - right!
    Yes, just the headers. The rest of it is REALLY a mess, but I've got it at least partly cooperating. I like to at least TRY to get things figured out before asking for help; that way I don't feel quite as dumb, LOL! But I spent the better part of yesterday trying to get the header situation solved so I gave up.

    This works perfectly!! Thank you so much!

    Have a great day!

    Jenny

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transferring multiple rows o data to another sheet, but only put the header row in 1 t

    You're welcome and thanks for the rep!

+ 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. Replies: 1
    Last Post: 04-14-2016, 05:14 AM
  2. Transferring Rows of Multiple Data from one excel workbook to another
    By chicity26 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-30-2014, 11:58 AM
  3. HELP! Transferring Rows of Multiple Data Between Workbooks
    By chicity26 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2014, 11:25 AM
  4. [SOLVED] Transferring Rows of Multiple Data from one excel workbook to another
    By chicity26 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2014, 04:24 PM
  5. Replies: 9
    Last Post: 12-11-2013, 09:35 AM
  6. Replies: 0
    Last Post: 11-15-2012, 01:13 PM
  7. Transferring multiple data from the same sheet in a single cell In another sheet.
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2012, 09:33 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