+ Reply to Thread
Results 1 to 12 of 12

Data - Horizontal to Vertical - with ONE Condition

  1. #1
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Data - Horizontal to Vertical - with ONE Condition

    I have Horizontal Data in C2:G2
    I want this data to be listed Vertical and consecutive at I2 but with one condition
    Example :
    C2 is listed because there is data in all C4:C9
    D2 is not listed because D4:D9 has missing data
    E2 is listed because there is data in all E4:E9
    ...
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Data - Horizontal to Vertical - with ONE Condition

    Straight to the point, as usual - no pleasantries, no "please" in sight. I guess you don't mean to be so abrupt ...

    Anyway, I'd probably do this with PowerQuery, and if you are interested and nobody else gets in first, I'll have a look in the morning, but I'm on the iPad now, so can't access PQ.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Data - Horizontal to Vertical - with ONE Condition

    Ohhh, I didn't know you are on line !!!
    Not at all, I try to be as simple as possible.
    But I always thank and leave positive feedback !

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Data - Horizontal to Vertical - with ONE Condition

    Yes, but you know, it would be so nice if you just said "thank you in anticipation" so that it didn't feel so much like a takeaway order. We are a happy community here - it's nice if people treat it as such, especially those who come here often.

    Would you be interested in PQ for this, or is it off limits for you?

  5. #5
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Data - Horizontal to Vertical - with ONE Condition

    Sorry again, no one need to "execute" orders here in their own time !
    I would like a formula !

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Data - Horizontal to Vertical - with ONE Condition

    Okey dokey. You don't know what you're missing ...

    I expect someone will have something for you very soon.

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Data - Horizontal to Vertical - with ONE Condition

    c12 =counta(C4:C9) and drag to the right

    c13 =If(C12<>6,"",countif($C$12:C$12,6)) and drag to the right.

    K2 =Iferror(INDEX($C$2:$G$13,1,Match(row()-1,$C$13:$G$13,0)),"") and drag down
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  8. #8
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Data - Horizontal to Vertical - with ONE Condition

    This is working fine !, thank you...
    I want to see if someone can come up wit an ideea without help rows/columns

    In my real work, I have dynamic data from C2 to ....250 columns
    So it is difficult to add help, but I can do that too
    Last edited by ionelz; 05-29-2020 at 01:53 PM.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Data - Horizontal to Vertical - with ONE Condition

    In that case, I would suggest you take a look at the solutions AliGW offered.

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Data - Horizontal to Vertical - with ONE Condition

    Please try at I2

    =IFERROR(INDEX($C$2:$G$2,AGGREGATE(15,6,COLUMN($C$4:$G$9)/(MMULT(TRANSPOSE(ROW($C$4:$G$9)^0),--($C$4:$G$9=""))=0),ROWS(I$2:I2))-COLUMN($C$2)+1),"")



    or Open Power Query/Get and Transform. Click on New Query.

    Open blank query in the editor, launch Advanced Editor and paste in the following code.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Data - Horizontal to Vertical - with ONE Condition

    With the code below to re-arange the data.

    After that a table with a helpcolumn.

    After that a pivot table.

    See the attached file.

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Data - Horizontal to Vertical - with ONE Condition

    Thank you all, problem solved !
    I would like also to thank you for spending time to write a VBA for this, I have tested them
    Thanks

+ 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. Sumifs for vertical & horizontal condition
    By rchure in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2016, 12:34 AM
  2. [SOLVED] Sumif Formula With 2 Condition in Horizontal & Vertical
    By Pawan Thakur in forum Excel General
    Replies: 4
    Last Post: 04-27-2015, 09:11 AM
  3. Horizontal Data to Vertical
    By mmagnin in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 01-18-2014, 12:45 AM
  4. [SOLVED] Horizontal data in vertical
    By ashfaquebwd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-10-2013, 03:50 AM
  5. Vertical to Horizontal data help!
    By hbrown78 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-05-2012, 09:57 PM
  6. [SOLVED] Data horizontal to vertical
    By sureshpunna in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-27-2012, 03:36 AM
  7. [SOLVED] Vertical to Horizontal data
    By trosasco in forum Excel General
    Replies: 5
    Last Post: 06-15-2012, 08:48 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