+ Reply to Thread
Results 1 to 10 of 10

Transposing cells

Hybrid View

StreekyD Transposing cells 05-10-2017, 06:04 PM
leelnich Re: Transposing cells 05-10-2017, 06:12 PM
leelnich Re: Transposing cells 05-10-2017, 06:35 PM
StreekyD Re: Transposing cells 05-11-2017, 11:40 AM
Glenn Kennedy Re: Transposing cells 05-11-2017, 11:58 AM
leelnich Re: Transposing cells 05-11-2017, 04:57 PM
Glenn Kennedy Re: Transposing cells 05-11-2017, 11:52 AM
Glenn Kennedy Re: Transposing cells 05-11-2017, 12:10 PM
StreekyD Re: Transposing cells 05-11-2017, 06:42 PM
leelnich Re: Transposing cells 05-11-2017, 07:14 PM
  1. #1
    Registered User
    Join Date
    12-14-2011
    Location
    NH
    MS-Off Ver
    Excel 2010
    Posts
    83

    Transposing cells

    I have two columns. A is the key column and has duplicate numbers that are relevant to numbers in column B.
    I want to transpose the list of only the duplicate numbers out in the same row that are relevant to column A
    See attached sample
    Attached Files Attached Files

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Transposing cells

    Could you be more specific about "relevant rows". How do you determine relevance, it's not clear on your woorksheet?
    OK, I see it now. You derived a list of unique values from column A. You wish to list all values from column B associated w each A value.
    Last edited by leelnich; 05-10-2017 at 06:18 PM.

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Transposing cells

    Paste this ARRAY FORMULA in B31:
    =IFERROR(INDEX($B$5:$B$28,MATCH(0,COUNTIF($A31:A31,$B$5:$B$28)+($A$5:$A$28<>$A31),0)),"")

    To confirm, press CTRL + SHIFT + ENTER. Curly brackets {} should embrace your formula, indicating an array formula.
    Now use the drag handle to fill across a few rows, then drag down.

    NOTE: if you can move the List elsewhere (say A31:?? becomes D5:??) and reserve Columns A and B for data, this form allows for data expansion.
    =IFERROR(INDEX($B:$B,MATCH(0,COUNTIF($D5:D5,$B:$B)+($A:$A<>$D5),0)),"")XX ps This does not work-Lee XX

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 05-11-2017 at 05:49 PM.

  4. #4
    Registered User
    Join Date
    12-14-2011
    Location
    NH
    MS-Off Ver
    Excel 2010
    Posts
    83

    Re: Transposing cells

    Hello Leenich, thank you for this attempt. It appears this formula is transposing all data from B and stringing it out.
    What I am trying to do is take the duplicated numbers from A and and take the corrosponding number from B and align them in the first row of the duplicatee row from A.

    So, I have a list of application numbers in A. B has part numbers. several part numbers in B are associated in A. I want to shorten my list by taking all the part numbers and spread them out in each of the relative application roe, then delete the row of relocated part numbers.

    Does this make sense?

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Transposing cells

    I forgot your file...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  6. #6
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Transposing cells

    Quote Originally Posted by StreekyD View Post
    .. It appears this formula is transposing all data from B and stringing it out...
    Did you press CTRL + SHIFT + ENTER? The formula will not work otherwise. On my trials, it matched your example output exactly.

    ps. OK, Expanding Alternate w entire columns doesn't work. Paste this ARRAY FORMULA in D5 and copy down:
    =IFERROR(INDEX($A$5:$A$28,MATCH(0,COUNTIF($D$4:$D4,$A$5:$A$28),0)),"")
    Now paste this ARRAY FORMULA in E5 and copy down:
    =IFERROR(INDEX($B$5:$B$28,MATCH(0,COUNTIF($D5:D5,$B$5:$B$28)+($A$5:$A$28<>$D5),0)),"")
    Attached Files Attached Files
    Last edited by leelnich; 05-11-2017 at 06:15 PM.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Transposing cells

    In C5, an array formula, copied across and down:
    =IFERROR(INDEX($B:$B,SMALL(IF($A$5:$A$28=$A5,IF(COUNTIF($A$5:$A5,$A5)=1,ROW($B$5:$B$28))),COLUMNS($A:B))),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Transposing cells

    Apols. i just noticed your expected answer!! It always helps to look.

    D5, copied down:
    =IFERROR(INDEX($A$5:$A$28,MATCH(0,INDEX(COUNTIF($D$4:$D4,$A$5:$A$28),0),0)),"")

    E5, an array formula, copied across and down:
    =IFERROR(INDEX($B:$B,SMALL(IF($A$5:$A$28=$D5,ROW($B$5:$B$28)),COLUMNS($A:A))),"")


    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-14-2011
    Location
    NH
    MS-Off Ver
    Excel 2010
    Posts
    83

    Re: Transposing cells

    Okay, thats cool!!!
    Its a 2300 line report

    We have a winner.

    Thank you so much!!!!

  10. #10
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Transposing cells

    You're welcome. By the way, if this isn't just a one-time thing, you should probably define dynamic named ranges to use in these formulae:
    In Name Manager - AppNumbers as formula =OFFSET(Sheet1!$A$1,4,0,COUNTA(Sheet1$A:$A)-4) would refer to A5:A??
    Assuming you made your results range big enough, and there are no blanks in the defined area, this would automatically adjust to changing list size.
    (NOTE: Offsetting from a cell OUTSIDE of the data (usually the header) keeps the reference intact even if the ENTIRE Data Range is deleted.)
    Last edited by leelnich; 05-11-2017 at 07:40 PM.

+ 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. 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
  2. [SOLVED] Transposing Cells
    By j_Southern in forum Excel General
    Replies: 2
    Last Post: 04-03-2012, 05:21 AM
  3. Replies: 3
    Last Post: 01-19-2011, 10:56 AM
  4. Transposing blocks of cells
    By parkinsc in forum Excel General
    Replies: 1
    Last Post: 10-05-2007, 01:29 PM
  5. Transposing Cells
    By dj_money in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2006, 03:35 AM
  6. [SOLVED] Transposing cells
    By GARY in forum Excel General
    Replies: 0
    Last Post: 03-16-2006, 09:10 PM
  7. Transposing cells
    By GARY in forum Excel General
    Replies: 0
    Last Post: 03-16-2006, 08:20 PM
  8. [SOLVED] Transposing cells
    By GARY in forum Excel General
    Replies: 0
    Last Post: 03-16-2006, 08:10 PM

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