+ Reply to Thread
Results 1 to 20 of 20

Formula to transpose rows to column with specific criteria

  1. #1
    Registered User
    Join Date
    08-06-2016
    Location
    berlin
    MS-Off Ver
    google sheet; Excel for Mac V 16.47.1
    Posts
    23

    Formula to transpose rows to column with specific criteria

    Hi community,

    I have a sheet with rows which I need to put into columns for as many as features each item has.
    The first feature must be next to the items, and the following ones all below.

    I have this situation:
    Screen Shot 2017-11-10 at 21.05.20.png

    and I want to get to here:
    Screen Shot 2017-11-10 at 21.05.41.png

    Can you help with a formula rather than a VBA?

    thanks
    herns

  2. #2
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Formula to transpose rows to column with specific criteria

    Can you post your sheet

  3. #3
    Registered User
    Join Date
    08-06-2016
    Location
    berlin
    MS-Off Ver
    google sheet; Excel for Mac V 16.47.1
    Posts
    23

    Re: Formula to transpose rows to column with specific criteria

    Quote Originally Posted by Jean.P28 View Post
    Can you post your sheet
    Hi Jean.P28,

    Here the attachment.

    Let me know if you have any further question and thank you.


    hern
    Attached Files Attached Files

  4. #4
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Formula to transpose rows to column with specific criteria

    My solution
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-06-2016
    Location
    berlin
    MS-Off Ver
    google sheet; Excel for Mac V 16.47.1
    Posts
    23

    Re: Formula to transpose rows to column with specific criteria

    Hi Jean.P28,

    I have this error when I run the macro :

    Run-time error '1004':

    Application-defined or object-defined error

    Is it maybe because my file has 205 rows to manage?

    thanks
    hern

  6. #6
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Formula to transpose rows to column with specific criteria

    Can i see that files

  7. #7
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Formula to transpose rows to column with specific criteria

    Is the result sheet protect than unprotect the sheet

  8. #8
    Registered User
    Join Date
    08-06-2016
    Location
    berlin
    MS-Off Ver
    google sheet; Excel for Mac V 16.47.1
    Posts
    23

    Re: Formula to transpose rows to column with specific criteria

    I only copy all the rows and I get that error.

    thanks
    hern

  9. #9
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Formula to transpose rows to column with specific criteria

    is the name of the sheet correct in the macro

  10. #10
    Registered User
    Join Date
    08-06-2016
    Location
    berlin
    MS-Off Ver
    google sheet; Excel for Mac V 16.47.1
    Posts
    23

    Re: Formula to transpose rows to column with specific criteria

    I can't find the name of the sheet in the macro.

    sorry!

  11. #11
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Formula to transpose rows to column with specific criteria

    try this macro
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    08-06-2016
    Location
    berlin
    MS-Off Ver
    google sheet; Excel for Mac V 16.47.1
    Posts
    23

    Re: Formula to transpose rows to column with specific criteria

    Unfortunately it doesn't work.
    I attach the original file. It's a little bit more complex than the example but the logic is the same: there is a column of items which are the sum of the features after the sign "=".

    Hope it helps.

    Let me know if you have any questions.

    thanks
    hern
    Last edited by hern; 11-13-2017 at 08:07 AM.

  13. #13
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Formula to transpose rows to column with specific criteria

    I hope that this macro do the job
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    08-06-2016
    Location
    berlin
    MS-Off Ver
    google sheet; Excel for Mac V 16.47.1
    Posts
    23

    Re: Formula to transpose rows to column with specific criteria

    Great job Jean. I almost got to the expected final results.
    Here some things missing:

    1) All items in column A must be in the "results" sheet > the macro is missing the ones with no features like A19.
    2) There are items whose features are in brackets like A218. Here an example of how it's expected:


    Is it possible?
    Attached Files Attached Files

  15. #15
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Formula to transpose rows to column with specific criteria

    no, for me is not possible, to complicated.

  16. #16
    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,204

    Re: Formula to transpose rows to column with specific criteria

    You need to clearly explain your logic because looking at last posted file I am none the wiser as how items are allocated to the columns.

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

    Re: Formula to transpose rows to column with specific criteria

    Helper in A7:
    =INDEX($D$1:$D$4,MATCH(0,INDEX(--(COUNTIF($A$6:A6,$D$1:$D$4)=$AB$1:$AB$4),0),0))

    Formula in B7, copied across to D7 and down:
    =IF(COUNTIF($A$7:$A7,$A7)=1,OFFSET(INDEX(D$1:D$4,MATCH(0,INDEX(--(COUNTIF($A$6:$A6,$D$1:$D$4)=$AB$1:$AB$4),0),0)),,-3+COLUMNS($B:$B)-1,,),"")

    Formula in E7, copied across and down:
    =OFFSET(INDEX(D$1:D$4,MATCH(0,INDEX(--(COUNTIF($A$6:$A6,$D$1:$D$4)=$AB$1:$AB$4),0),0)),,3*(COUNTIF(A$7:$A7,$A7)-1))

    There night be a small Excel bug as (sometimes) the horizontal range locking drops off when dragging across. If it does, manually re-set.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  18. #18
    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,204

    Re: Formula to transpose rows to column with specific criteria

    Glenn,

    See file in Post #14.

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

    Re: Formula to transpose rows to column with specific criteria

    I used the one in post 3....

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

    Re: Formula to transpose rows to column with specific criteria

    I've now looked at the one in 14.... and now have no idea what is wanted.

+ 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. Formula to show only rows with a specific criteria in first column
    By sp87 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-25-2016, 08:22 PM
  2. Combine multiple rows in a specific column based on matching criteria? VBA solution?
    By hopegriffin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2015, 07:11 PM
  3. [SOLVED] copy column headers into rows if it meets a specific criteria
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-30-2013, 06:05 AM
  4. Replies: 0
    Last Post: 10-23-2012, 04:59 PM
  5. Replies: 6
    Last Post: 06-27-2012, 04:38 PM
  6. Excel Transpose Column to Rows Based on Criteria
    By lilianphoebs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2011, 02:57 PM
  7. Excel Transpose Column to Rows Based on Criteria
    By lilianphoebs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2011, 10:49 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