+ Reply to Thread
Results 1 to 5 of 5

transfer data from multiple rows to one single row

  1. #1
    Registered User
    Join Date
    10-07-2008
    Location
    Greece
    Posts
    3

    transfer data from multiple rows to one single row

    hi everybody..

    i need to do the following to a large number of data:

    current aspect of table:

    name1____data11____(empty)____(empty)____(..etc)
    name1____(empty)___data12_____(empty)____(..etc)
    name1____(empty)__(empty)_____data13_____(..etc)
    ..(etc)
    name2____data21____(empty)____(empty)____(..etc)
    name2____(empty)___data22_____(empty)____(..etc)
    name2____(empty)__(empty)_____data23_____(..etc)
    ..(etc)

    desired result:

    name1____data11____data12____data13____(..etc)
    name2____data21____data22____data23____(..etc)
    ..(etc)

    I think you get the picture..In general I have some rows of data for the same name with data in a single column in each row and I need to replace them with a single row and data in the corresponding columns...The same for the next name..
    I hope somebody has a solution because copy/paste is really time consuming..

    thanks..
    Last edited by fmnstr; 10-07-2008 at 03:55 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    For the range of A1:whatever


    try this
    Please Login or Register  to view this content.
    Copy G1 right to where you need
    then copy the first row start from F1
    paste down to the last name row

    Then you can get a range of data with the correct result and some rubbish as well
    Firt copy and paste specil value
    Then, Sort the data and delete the rubbish, you will get what you need,
    I need your support to add reputations if my solution works.


  3. #3
    Registered User
    Join Date
    10-07-2008
    Location
    Greece
    Posts
    3
    sglife u r gr8..thanks a lot..

    i have only one problem...in the data cells there are numbers (0-30) and 0 means something.With your formula I get
    0 in the empty cells which can be a problem. i'll give you a more detailed view of my table, if you can come up
    with something.

    (# corresponding to a certain month entry) (name) (hire date) (leave date) [months (jan to dec) with 4 subfields
    each for the different type of absences] :total 48 columns

    example:
    ___________________________january___february__march________april .....
    1_John_date_date___________0 1 1 0_____________________________________________(for january)
    2_John_date_date_____________________2 1 0 0___________________________________(for february)
    3_Mike_date_date______________________________0 1 1 0__________________________(for march)
    4_Mike_date_date___________________________________________2 1 0 0_____________(for april)
    1_Mary_date_date___________2 1 1 0_____________________________________________(for january)
    2_Mary_date_date_____________________3 0 0 1___________________________________(for february)


    As you can see the first column always refers to a specific set of columns (corresponding to the appropriate
    month) that only them contain usable data in each row. maybe I can use that...?
    Last edited by fmnstr; 10-08-2008 at 03:12 AM.

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    sglife - why not just
    F1=A1, G1=B2, H1=C3...
    Same results(?)

    To get rid of 0s, tis could be revised to:
    F1=IF(A1="","",A1)
    G1=if(b2="","",b2)...

    HTH

  5. #5
    Registered User
    Join Date
    10-07-2008
    Location
    Greece
    Posts
    3
    @ cheeky charlie, the number of rows in each name is not the same..that 's because each person is hired for different time periods..(i.e. feb-sep, jun-mar, mar-aug etc.). So i think i can't use such a standardized formula.

    @ sglife..ok i tried it on the original document and it doesn't work for 2 reasons..the first is the problem with the zeros from the offset function, the second one is that i have 4 cells in the same row and then 4 cells in the next row etc.. your function goes like a ladder one cell at the time...i need 4 cells ladder... i tried to change the function accordingly but no successful result.. i think the trick might be on the first cell that tells the month each row refers to..but i can't grasp a solution..
    Last edited by fmnstr; 10-08-2008 at 10:34 AM.

+ 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. Combining data from 2 worksheets into a single data source
    By skerdoba in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2008, 06:38 PM
  2. Compressing data or Trimming Blank Rows
    By all4excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2008, 07:28 AM
  3. New to writing macros
    By ynnod in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-06-2007, 10:20 PM
  4. Data Filter on grouped rows
    By mystic342005 in forum Excel General
    Replies: 0
    Last Post: 07-29-2007, 12:04 AM
  5. Linking multiple cell data to a single cell
    By matt92 in forum Excel General
    Replies: 5
    Last Post: 03-14-2007, 01:54 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