+ Reply to Thread
Results 1 to 7 of 7

How to data from four colums, but list two of them under each other

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    26

    How to data from four colums, but list two of them under each other

    Hi,

    Example can be found enclosed.

    I would need to get a working formula, how to keep two columns (A-B) as they are, but then add next to column(C-D) under each other, but copy columns A-B next to them. On the columns F-H I have demonstrate the way I would like to get the columns A-D to be generated with a formula.

    I have tried with match and offset, but I did find a way how to make the A-B column to be "duplicated" and C-D just to be entered under each other. I believe there is a simple way, but how to do it? Maybe somehthing (if date is >than A2 then..) or something.

    Wish someone can help!

    Regards,

    Tom
    Attached Files Attached Files

  2. #2
    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: How to data from four colums, but list two of them under each other

    In F2, copied across and down:

    =IFERROR(INDEX(A$2:A$3,MATCH(0,INDEX(--(COUNTIF(F$1:F1,A$2:A$3)=COUNTA($C$1:$D$1)),0),0)),"")

    In G2, copied down:

    =IFERROR(INDEX($C$2:$D$3,1+MOD((ROWS(H$2:H2)-1),COUNTA($C$1:$D$1)),1+INT((ROWS(H$2:H2)-1)/COUNTA($C$1:$D$1))),"")

    in Finland, you may need ; instead of ,
    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

  3. #3
    Registered User
    Join Date
    10-08-2012
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: How to data from four colums, but list two of them under each other

    Hi Glenn!

    Otherwise yes what I mean, but in the example it gives same test column number twise, not the other one.
    1.1.2021 50 1900
    1.1.2021 50 1900 <--- this should be 3000
    5.1.2021 500 3000 <--- this should be 1900
    5.1.2021 500 3000

    Ideas about the fix?

  4. #4
    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: How to data from four colums, but list two of them under each other

    Duhhh!! I got my MODs and my INTs the wrong way round!! AND I've already had my morning coffee.

    =IFERROR(INDEX($C$2:$D$3,1+INT((ROWS(H$2:H2)-1)/COUNTA($C$1:$D$1)),1+MOD((ROWS(H$2:H2)-1),COUNTA($C$1:$D$1))),"")
    Attached Files Attached Files

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: How to data from four colums, but list two of them under each other

    Single non array formula in F2 then drag down and accross

    Please Login or Register  to view this content.
    Quang PT

  6. #6
    Registered User
    Join Date
    10-08-2012
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: How to data from four colums, but list two of them under each other

    Sounds terrible but the function works like a charm! Thank you so much Glenn, stay safe. Now I have to study how the function works.

    Cheers,

    Tom

  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 2403
    Posts
    44,053

    Re: How to data from four colums, but list two of them under each other

    You're welcome. But do also take a look at the other one at Post 5. It's very neat!! Both work by using complicated looking formulae to return column and row numbers... If you need help understanding something, just ask. However, formulas/evaluate formula is a good place to start.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as 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. Replies: 5
    Last Post: 10-03-2020, 10:33 PM
  2. Hide colums based on drop down list
    By annaisakiwi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-27-2018, 08:56 PM
  3. Compare two fields in two columns with a List, also two colums
    By torti111 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-02-2015, 09:53 AM
  4. [SOLVED] drop down list, using 2 colums into one
    By jl2 in forum Excel General
    Replies: 5
    Last Post: 08-26-2014, 12:05 PM
  5. Merge of colums into single column with collated data and with alignment as List (*)
    By anushasmanian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2013, 06:13 PM
  6. combobox - List from 2 colums - but 1 hidden
    By Lkivagten in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2013, 10:09 PM
  7. [SOLVED] Big list colums naming and repeating when printing
    By MaR in forum Excel General
    Replies: 1
    Last Post: 04-24-2005, 06:06 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