+ Reply to Thread
Results 1 to 4 of 4

Transpose table format with dates from horizontal to vertical

  1. #1
    Registered User
    Join Date
    12-17-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    64

    Exclamation Transpose table format with dates from horizontal to vertical

    Hello,

    I have table with a lot of data, it is an attendance list table with the below horizontal format, it lists the attendance taken from(Date Start) > to (Date End)
    the problem is that it has Mon to Sun without dates.

    I need to list each row for each week day with the corresponding date and the presence letter, like "A" for absent and "P" for present.
    So instead I need to delete all weekdays columns and transpose to rows with the matching date of the weekday.

    It is not easy to explain this, but if you have a look at the attached excel you will get it.
    It is a big challenge and couldn't find a way.

    From this format:

    ID Program Date From Date To Mon Tue Wed Thu Fri Sat Sun
    555333 BA 9/20/2021 9/22/2021 P P P - - - -
    555444 BAA 9/20/2021 9/26/2021 P P P A P A P


    To this format:


    ID Program Date Presence
    555333 BA 9/20/2021 P
    555333 BA 9/21/2021 P
    555333 BA 9/22/2021 P
    555444 BAA 9/20/2021 P
    555444 BAA 9/21/2021 P
    555444 BAA 9/22/2021 P
    555444 BAA 9/23/2021 A
    555444 BAA 9/24/2021 P
    555444 BAA 9/25/2021 A
    555444 BAA 9/26/2021 P

    Any Idea?

    Thanks
    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,000

    Re: Transpose table format with dates from horizontal to vertical

    G8 copied across and dnown:
    =IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW($B$3:$B$4)/($F$3:$L$4<>"-"),ROWS(G$8:G8)),1),"")

    I8 copied down:
    =IF(COUNTIF(G$8:G8,G8)=1,VLOOKUP(G8,Table2[[ID]:[Date From]],3,FALSE),I7+1)

    J8, copied down:
    =IF($G8="","",INDEX(F$3:L$4,MATCH($G8,$B$3:$B$4,0),(COUNTIF($G$8:$G8,$G8))))

    see 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.

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

  3. #3
    Registered User
    Join Date
    12-17-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    64

    Re: Transpose table format with dates from horizontal to vertical

    Ohh that's marvelous! thanks a lot Glenn, I wouldn't have found a way myself.

  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,000

    Re: Transpose table format with dates from horizontal to vertical

    You're welcome.



    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 (just above the first post in the thread) 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. [SOLVED] Transpose horizontal to vertical
    By akalien in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-12-2021, 12:09 PM
  2. [SOLVED] transpose last row from horizontal to vertical
    By JACK JOUSH in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-10-2021, 09:04 AM
  3. [SOLVED] SumIfs / Sumproduct for table with vertical and horizontal lookup criteria (text+dates)
    By benvass in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2018, 10:34 AM
  4. [SOLVED] Transpose horizontal table to a vertical table via query
    By Journeyman3000 in forum Access Tables & Databases
    Replies: 5
    Last Post: 12-03-2015, 10:21 PM
  5. Transpose Vertical Data to Horizontal
    By Randu555 in forum Excel General
    Replies: 5
    Last Post: 04-18-2013, 05:05 PM
  6. [SOLVED] Transpose Horizontal to Vertical with ID Column
    By galaxycoff in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-04-2012, 10:16 PM
  7. [SOLVED] convert vertical to horizontal (without Transpose)
    By timtim89 in forum Excel General
    Replies: 6
    Last Post: 03-28-2012, 10:50 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