+ Reply to Thread
Results 1 to 16 of 16

Transposing a vertical list automatically after pasting it in a column?

  1. #1
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Transposing a vertical list automatically after pasting it in a column?

    Good morning gurus;

    I've got some PDF files (all the same format) that are converted to one big CSV. Two columns: ColA = field names, ColB = values. Just a few values for each person (8 values actually).

    And, I've built into the PDF a way for it to produce a field that says "linebreak" between people so I can spot them.

    I know how to paste in transpose, but I want to be able to paste all of these two columns into the sheet and have it formulaically transpose them so each person's "situation" is listed horizontally.

    I can't seem seem to figure out how to get excel to recognize that after the word linebreak, the next 8 lines should be transposed into a single line.

    This time I actually have to attach what I'm talking about (see attached sheet).

    As always, thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Transposing a vertical list automatically after pasting it in a column?

    in C2

    =IFERROR(INDEX($B$2:$B$18,AGGREGATE(15,6,(ROW($A$2:$A$1000)-ROW($A$2)+1)/($A$2:$A$1000=C$1),ROWS($1:1))),"")

    Copy across and down
    Last edited by JohnTopley; 10-04-2021 at 03:13 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Transposing a vertical list automatically after pasting it in a column?

    That worked well for the first person but it replicates the first person on every line when you drag downward. Just a whole lotta of George Washingtons

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Transposing a vertical list automatically after pasting it in a column?

    See amended post #2

  5. #5
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Transposing a vertical list automatically after pasting it in a column?

    Quote Originally Posted by JohnTopley View Post
    See amended post #2
    I'll check that. I as soon as I posted I saw you recognized it too.

  6. #6
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Transposing a vertical list automatically after pasting it in a column?

    Quote Originally Posted by JohnTopley View Post
    See amended post #2
    You sir, are underpaid.

    Thank you.

  7. #7
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Transposing a vertical list automatically after pasting it in a column?

    Quote Originally Posted by JohnTopley View Post
    in C2

    =IFERROR(INDEX($B$2:$B$18,AGGREGATE(15,6,(ROW($A$2:$A$1000)-ROW($A$2)+1)/($A$2:$A$1000=C$1),ROWS($1:1))),"")

    Copy across and down
    John, could you take a moment and break that down for me? I'm re-pasting more data in (that's got an extra row now) and I thought I understood what you made, but apparently not.

    See, I'm exporting from acrobat dc pro. PDF -> Excel.

    The form had a title image and text in the center of the header area. It comes into excel as just text, but I'm trying to ignore it. I feel like if you explain the formula I can make an adjustment based on that.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Transposing a vertical list automatically after pasting it in a column?

    INDEX($B$2:$B$18

    AGGREGATE(15,6,(Row($a$2:$a1000)-Row($A$2)-1)

    ($A$2:$A$1000=C$1),


    The RED range is the data to be extracted

    The AGGREGATE function with parameter i15 is the SMALL function and the 6 says ignore error values

    The GREEN is checking the range for matches with the headings in row 1

    The results is an array of row numbers where matches are found and where no match is found we get #DIV0 error which are ignored.

    The ROWS($1:1) is simple a counter starting at 1 and increasing by 1 as the formula is dragged down the column.


    So for "Last name" there are matches in rows 2 and 11 but as the range starts in B2 we get results of 1 and 10 with #DIV0 in between.

    So rows($1:1) selects the SMALLest (equivalent to SMALL(A2:a100,1) i.e 1 and rows($1:2) selects the 2nd smallest i.e 10 .the #DIV0 are ignored.

    Use the Formulas >>>>.Evaluate Formula to see how this works.

    Adding an extra line should not affect this but post an updated file anyway.

  9. #9
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Question Re: Transposing a vertical list automatically after pasting it in a column?

    So,

    I've got a fillable form that folks will send in to me (just a few fields).

    Acrobat DC pro combines them to a single pdf (for ease) and exports to CSV--which seems to work.

    The aggregate function seems to not recognize the last name: field to start scrutinizing even though everything is formatted as text.

    I've included a sample here.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Transposing a vertical list automatically after pasting it in a column?

    All your heading in row 1 have a trailing blank e.g. "Last Name: " rather than "Last Name:" so matching fails.

  11. #11
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Transposing a vertical list automatically after pasting it in a column?

    SO IT DID.

    Good catch.

    I just realized too that all of those files had the same data. I'm having some trouble with acrobat combining the 4 files and not just repeating the first one 4 times.

  12. #12
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: Transposing a vertical list automatically after pasting it in a column?

    The formula is a little simpler
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Transposing a vertical list automatically after pasting it in a column?

    Quote Originally Posted by JohnTopley View Post
    All your heading in row 1 have a trailing blank e.g. "Last Name: " rather than "Last Name:" so matching fails.

    I fixed the trailing blanks and duplicate pdf, but it's only capturing the data of the first 2 forms. The presentation of the other two forms is identical (in terms of labels and such) because they all came from the same fillable form originally.

  14. #14
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Transposing a vertical list automatically after pasting it in a column?

    Disregard, it was the B:b index range. Needed to expand that.

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Transposing a vertical list automatically after pasting it in a column?

    If this is solved please mark as such: thank you

  16. #16
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Transposing a vertical list automatically after pasting it in a column?

    I will, just need to test a tad more before reverting it back to solved.

+ 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. Excel VBA for transposing a list of data and pasting it to every 8th column
    By EvanGodo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2021, 03:44 AM
  2. Need vba code for transposing horizontal to vertical.
    By foyzulabrarchy in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-22-2019, 10:44 AM
  3. Transposing Horizontal to Vertical and keep one cell value
    By TinoBradica in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2018, 02:43 PM
  4. [SOLVED] Transposing From Horizontal to Vertical with Intervals
    By zinkloride in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-13-2014, 06:11 AM
  5. Transposing list of values with 6 zeroes in front to retain the zero after transposing
    By Lisa4legin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2013, 03:34 AM
  6. Replies: 10
    Last Post: 12-11-2012, 06:08 PM
  7. Transposing Data from Horizontal to Vertical
    By OTexcel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-16-2012, 08:28 PM

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