+ Reply to Thread
Results 1 to 4 of 4

Reduce individual lines to a simpler non-repetitive method

  1. #1
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Reduce individual lines to a simpler non-repetitive method

    I am using Vb to place data from a single row in one sheet, into a array of rows in a few columns in another sheet.

    As there is a lot of data to copy across betwen the sheets, i am finding that the code is very long and repetitive.
    The only modification in MOST cases from one line to the next is the cell reference and an offset number by 1 fromt eh previous.

    I remember a line of code once used something line
    Please Login or Register  to view this content.
    that was used to place the next value into the next cell down or across etc.


    Is there a way to perform the code below in a much less repetitive way?

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: Reduce individual lines to a simpler non-repetitive method

    Just a thought, is there a way to specify the individual ranges on cells in sheet1 and also specify the cells in the row is sheet2.
    Then transfer the databased on the first cell reference, and step down or across a numerical set number of cells then stop?

    I have the data in a single row in sheet2 from Column A - KB.

    Sheet 1 has numerous fixed ranges as below:
    A5-A8, B5-B8, C5-C8, D5-D8, E5-E8, G5-G8.
    A10-A41, B10-B41, C10-C41, D10-D41, E10-E41, G10-G41.
    A44-A53, B44-B53, C44-C53, D44-D53, E44-E53, G44-G53.

  3. #3
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: Reduce individual lines to a simpler non-repetitive method

    I am now trying to achieve my required result by somehow adapting the following code used on another macro:
    Please Login or Register  to view this content.
    The above copies data from colum C cells 10-41 into sheet 2 from a set cell in row 2, and places the other values down the column in sheet 1 across the same row in sheet 2.

    I basically need the opposite to happen.
    Data from the single row to be transposed into sheet 1 but placed down the column instead.
    I did try something like the following, but i seemed to get the first cell value, but no other values down the column in sheet 1.
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: Reduce individual lines to a simpler non-repetitive method

    Please Login or Register  to view this content.
    Self Solved with the above....

+ 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