+ Reply to Thread
Results 1 to 8 of 8

Taking data from columns and rows to create only rows whilst keeping multiple ID reference

  1. #1
    Registered User
    Join Date
    07-22-2014
    Location
    London, UK
    MS-Off Ver
    Microsoft for Mac Version 14.4.3
    Posts
    9

    Taking data from columns and rows to create only rows whilst keeping multiple ID reference

    Hi

    I'm not sure if the title really explains the problem, but here goes:

    Attached is a subset of data (only a very small subset as there are actually 70 rows per case). There are two sheets. The first sheet "example of raw data" is a sample of what I have extracted for this particular exercise. The second sheet "what I want" is how I want to make it look. So what I want to do is:

    For each case (i.e. ID) take the 6 response entries (i.e. 1 or 0) for each case from OneSpan.ACC in the first sheet and populate B1T1 to B1T6 in the second sheet (the first value going to B1T1, the 2nd to B1T2 etc). Then move to column TwoSpan.ACC in the first sheet and populate B2T1, B2T2 etc in the second sheet with those value, etc.

    Obviously the issue is that in sheet 1, for each case, there are seven columns (hence B1,B2,B2 etc in sheet 2) plus six rows in each (hence T1,T2,T3 etc in sheet 2) so a simple transpose won't work. I have tried formulas but it becomes too complicated as I don't seem to be able to build a logical flow for the cell references as we are not referencing data all in one row or all in one column.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Taking data from columns and rows to create only rows whilst keeping multiple ID refer

    See attached. sample for Sean2.xlsx
    Hope this is what you wanted.

  3. #3
    Registered User
    Join Date
    07-22-2014
    Location
    London, UK
    MS-Off Ver
    Microsoft for Mac Version 14.4.3
    Posts
    9

    Re: Taking data from columns and rows to create only rows whilst keeping multiple ID refer

    Hi jewelsharma.

    Thank you!. Yes, this is what I want. Do I just copy that code across all cells in the second sheet? I have 6 files with 92 cases in each and 70 cases per record.

    Hope it's that simple!

    Rebecca

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Taking data from columns and rows to create only rows whilst keeping multiple ID refer

    So long as the structure of all other cases and files is exactly same as this, it should work fine.
    Good luck

  5. #5
    Registered User
    Join Date
    07-22-2014
    Location
    London, UK
    MS-Off Ver
    Microsoft for Mac Version 14.4.3
    Posts
    9

    Re: Taking data from columns and rows to create only rows whilst keeping multiple ID refer

    Thank you so much! Life saver!

  6. #6
    Registered User
    Join Date
    07-22-2014
    Location
    London, UK
    MS-Off Ver
    Microsoft for Mac Version 14.4.3
    Posts
    9

    Re: Taking data from columns and rows to create only rows whilst keeping multiple ID refer

    Hello, again!
    Quick question. I am applying this formula to the other files. In a couple of them there are a different number of blank rows between subjects (id). In the file you so kindly helped me with, there were 3 blnk rows at the start of each new subject. In some of the other files, there are 6 blank rows. Are you able to tell me what I would need to change in the formula to account for this. I cave cut and paste the formula below if that is easier.
    Thank you once again.

    =OFFSET('Raw Data'!$A$1,MATCH($B2,'Raw Data'!$C:$C,0)+((--RIGHT(LEFT(C$1,2),1)-1)*6)+1 + (--RIGHT(C$1,1)),(--RIGHT(LEFT(C$1,2),1)+2))


  7. #7
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Taking data from columns and rows to create only rows whilst keeping multiple ID refer

    try the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Basically, the 4 above = No. of blanks rows - 2. Initially it was 1, as your sample had 3 blank rows. The rest of the formula should remain unchanged.

    HTH!

  8. #8
    Registered User
    Join Date
    07-22-2014
    Location
    London, UK
    MS-Off Ver
    Microsoft for Mac Version 14.4.3
    Posts
    9

    Re: Taking data from columns and rows to create only rows whilst keeping multiple ID refer

    Hi!

    I don't suppose you fancy helping me out again do you? I tried myself but I just can't work it out. It's a transpose problem again similar to the last. I, again, have 6 response entries per item for each case (subject). Except this time, I want to do the transposing within the same sheet. In the attached you can see I have manually transposed the first 9 cases taking the first 6 rows for the specific subject in column M and transposing them across columns M to R. The taking the first 6 rows for that subject in column S and transposing across S:X etc up to column AQ (transposing AQ:AW). I have 6 files with 92 cases in each (again) so was wondering if you (or anyone!) can help me with the formula.
    Attached Files Attached Files

+ 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: 4
    Last Post: 05-12-2014, 06:58 PM
  2. [SOLVED] Create multiple rows from cell value whilst preserving other cell values
    By Kjellis85 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 11-15-2013, 03:47 AM
  3. Taking data in rows and stacking into columns
    By jcoe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-22-2013, 05:50 AM
  4. Inserting rows whilst keeping filter range.
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-16-2010, 09:44 AM
  5. [SOLVED] Sorting rows/columns and keeping reference!
    By minismood in forum Excel General
    Replies: 3
    Last Post: 01-12-2006, 11:10 AM

Tags for this Thread

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