+ Reply to Thread
Results 1 to 2 of 2

Convert Horizontal Spreadsheet to Vertical

Hybrid View

  1. #1
    Registered User
    Join Date
    03-08-2024
    Location
    USA
    MS-Off Ver
    Microsoft 365 Version 2402, 64 bit
    Posts
    1

    Convert Horizontal Spreadsheet to Vertical

    Hello,

    I need help converting a Horizontal Excel Spreadsheet to a Vertical Format. It is a rather large spreadsheet with over 1,000 Payees (Sample Spreadsheet attached). Each individual entry "Payee" does not have all of the various "Fees". Viewing this Spreadsheet in a Vertical Format would make it much easier to work with. Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Convert Horizontal Spreadsheet to Vertical

    Welcome to the forum.

    Converted with Power Query.

    Formula: copy to clipboard
    let
    Fonte = Excel.Workbook(File.Contents("D:\Users\DomingosJunqueira\Downloads\Report.xls"), null, true),
    #"Merch Report1" = Fonte{[Name="Merch Report"]}[Data],
    #"Colunas Removidas" = Table.RemoveColumns(#"Merch Report1",{"Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13", "Column14", "Column15", "Column16", "Column17"}),
    #"Linhas Filtradas" = Table.SelectRows(#"Colunas Removidas", each ([Column2] <> null)),
    #"Cabeçalhos Promovidos" = Table.PromoteHeaders(#"Linhas Filtradas", [PromoteAllScalars=true]),
    #"Linhas Filtradas1" = Table.SelectRows(#"Cabeçalhos Promovidos", each ([Account] = null) and ([Payee] <> null)),
    #"Dividir Coluna por Delimitador" = Table.SplitColumn(#"Linhas Filtradas1", "Fee Description", Splitter.SplitTextByEachDelimiter({" "}, QuoteStyle.Csv, false), {"Fee Description.1", "Fee Description.2"}),
    #"Texto Aparado1" = Table.TransformColumns(#"Dividir Coluna por Delimitador",{{"Payee", Text.Trim, type text}}),
    #"Colunas Mescladas" = Table.CombineColumns(Table.TransformColumnTypes(#"Texto Aparado1", {{"Fee Description.1", type text}}, "pt-BR"),{"Fee Description.1", "Payee"},Combiner.CombineTextByDelimiter(" - ", QuoteStyle.None),"Mesclado"),
    #"Colunas Reordenadas" = Table.ReorderColumns(#"Colunas Mescladas",{"Mesclado", "ABA", "Account", "Account Type", "Fee Description.2", "Amount"}),
    #"Texto Aparado" = Table.TransformColumns(#"Colunas Reordenadas",{{"Fee Description.2", Text.Trim, type text}}),
    #"Texto em Maiúscula" = Table.TransformColumns(#"Texto Aparado",{{"Fee Description.2", Text.Upper, type text}}),
    #"Coluna Condicional Adicionada" = Table.AddColumn(#"Texto em Maiúscula", "Personalizar", each if Text.StartsWith([Fee Description.2], "ACH") then "ACH" else if Text.StartsWith([Fee Description.2], "MSC") then "MSC" else if Text.StartsWith([Fee Description.2], "NET") then "Network Pass" else if Text.StartsWith([Fee Description.2], "EX") then "Ex Warranty" else if Text.StartsWith([Fee Description.2], "WIRE") then "Wireless Modem" else null),
    #"Colunas Removidas1" = Table.RemoveColumns(#"Coluna Condicional Adicionada",{"Fee Description.2"}),
    #"Valor Substituído" = Table.ReplaceValue(#"Colunas Removidas1","$","",Replacer.ReplaceText,{"Amount"}),
    #"Tipo Alterado" = Table.TransformColumnTypes(#"Valor Substituído",{{"Amount", Currency.Type}}),
    #"Coluna em pivô" = Table.Pivot(#"Tipo Alterado", List.Distinct(#"Tipo Alterado"[Personalizar]), "Personalizar", "Amount"),
    #"Colunas Renomeadas" = Table.RenameColumns(#"Coluna em pivô",{{"Mesclado", "Payee"}}),
    #"Colunas Reordenadas1" = Table.ReorderColumns(#"Colunas Renomeadas",{"Payee", "ABA", "Account", "Account Type", "ACH", "Wireless Modem", "Network Pass", "Ex Warranty", "MSC"}),
    #"Colunas Removidas2" = Table.RemoveColumns(#"Colunas Reordenadas1",{"Account Type"})
    in
    #"Colunas Removidas2"
    Attached Files Attached Files
    Last edited by DJunqueira; 03-08-2024 at 05: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. [SOLVED] Convert Horizontal to Vertical Table
    By Durlav in forum Excel General
    Replies: 6
    Last Post: 09-09-2020, 11:37 PM
  2. How to convert Vertical into Horizontal
    By Subha M in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-18-2014, 07:27 AM
  3. convert vertical data to horizontal
    By syuk225 in forum Excel General
    Replies: 3
    Last Post: 06-14-2012, 03:58 AM
  4. convert horizontal to vertical
    By syuk225 in forum Excel General
    Replies: 2
    Last Post: 06-14-2012, 02:56 AM
  5. convert horizontal to vertical
    By syuk225 in forum Excel General
    Replies: 1
    Last Post: 06-14-2012, 02:50 AM
  6. convert horizontal to vertical
    By mhedge in forum Excel General
    Replies: 2
    Last Post: 03-09-2011, 12:45 PM
  7. [SOLVED] Convert Vertical row data into Horizontal
    By ajang in forum Excel General
    Replies: 8
    Last Post: 11-01-2010, 01:28 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