Read a list of Node Name and its software name, then find the next Node Name

%3CLINGO-SUB%20id%3D%22lingo-sub-2277561%22%20slang%3D%22en-US%22%3ERead%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2277561%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENewbie%20here....I%20have%20a%20question.%26nbsp%3B%20What's%20the%20best%20way%20to%20read%20from%20a%20txt%20file%20that%20contains%20a%20list%20of%20Node%20Name%20and%20its%20Software%20Name%2C%20set%20it%20in%20a%20column1.....then%20reads%20the%20next%20Node%20Name%20and%20display%20in%20the%20second%20column2%2C%20etc...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExpected%20Output%3A%3C%2FP%3E%3CP%3ENode%20Name%3A%20C1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Node%20Name%3A%20C2%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BNode%20Name%3A%20C3%3C%2FP%3E%3CP%3Esw1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3Bswname%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3Bswname%3C%2FP%3E%3CP%3Eswname%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20swname%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3Bswname%3C%2FP%3E%3CP%3Eetc....%3C%2FP%3E%3CP%3EEach%20Node%20Name%20column%20can%20have%20as%20many%20as%20between%2020%20to%20300%20sw%20under%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20help%3F%26nbsp%3B%20The%20text%20file%20is%20has%20a%20single%20column%20consists%20of%20Node%20Name%20follow%20by%20software%20name.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%2C%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2277561%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2280710%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280710%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EText%20file%20contains%3A%3C%2FP%3E%3CP%3ENodeName%3A%20Server1%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Eetc..%3C%2FP%3E%3CP%3ENodeName%3A%20Server2%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Eetc...%3C%2FP%3E%3CP%3ENodeName%3A%20Server3%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Esw%3C%2FP%3E%3CP%3Eetc...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20this%20help%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2278368%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2278368%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1026096%22%20target%3D%22_blank%22%3E%40TB_VN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHow%20do%20we%20know%20that%20the%20text%20in%20one%20row%20is%20node%20name%20and%20in%20another%20one%20is%20software%20name%3F%20Perhaps%20you%20may%20share%20small%20sample%20file%20to%20illustrate.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2277945%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2277945%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F93699%22%20target%3D%22_blank%22%3E%40Rajesh-S%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20that%20feature%2C%20but%20since%20my%20dataset%20is%20on%20a%20one%20long%20column%20without%20any%20separated%20commas%2C%20how%20can%20I%20set%20it%20into%20cols%20and%20rows%20per%20Node%20Name%20is%20the%20question.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2277623%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2277623%22%20slang%3D%22en-US%22%3EExcel%20has%20built%20in%20command%20DATA%20then%20Get%20External%20data%2C%2C%20allows%20to%20import%20data%20from%20Text%20file%20also%2C%20where%20every%20record%20must%20be%20in%20a%20Row%2C%20and%20either%20separated%20by%20Space%20or%20Comma.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2283469%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2283469%22%20slang%3D%22en-US%22%3EThe%20text%20will%20say%20%22Node%20Name%3A%20Server1%22...etc%2C%20same%20goes%20for%20Software%20Name%3A%20nameofsw%20in%20front%20it.%20These%20are%20probably%20the%20keywords%20you're%20after%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2284960%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2284960%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1026096%22%20target%3D%22_blank%22%3E%40TB_VN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes%2C%20that's%20more%20clear%20now%2C%20thank%20you.%3C%2FP%3E%0A%3CP%3EI'd%20use%20Power%20Query%20for%20such%20transformation.%20Source%20could%20be%20CSV%20file%20as%20in%20your%20tag%2C%20in%20my%20sample%20that's%20the%20column%20named%20%22range%22.%20In%20brief%3A%20query%20it%2C%20create%20another%20column%20with%20node%20names%20against%20each%20record%2C%20group%20by%20nodes%20without%20aggregation%20creating%20list%20of%20software%20for%20each%20node%2C%20create%20table%20from%20these%20lists.%3C%2FP%3E%0A%3CP%3EIt%20looks%20like%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20462px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275251i07D832FBD928516C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eand%20M-script%20is%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powerquery%22%3E%3CCODE%3Elet%0A%20%20%20%20Source%20%3D%20Excel.CurrentWorkbook()%7B%5BName%3D%22range%22%5D%7D%5BContent%5D%2C%0A%20%20%20%20%23%22Filtered%20Rows%22%20%3D%20Table.SelectRows(Source%2C%20each%20(%5BColumn1%5D%20%26lt%3B%26gt%3B%20null))%2C%0A%20%20%20%20%23%22Added%20Custom%22%20%3D%20Table.AddColumn(%0A%20%20%20%20%20%20%20%20%23%22Filtered%20Rows%22%2C%0A%20%20%20%20%20%20%20%20%22Nodes%22%2C%0A%20%20%20%20%20%20%20%20each%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20Text.Start(%5BColumn1%5D%2C9)%3D%22NodeName%3A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20then%20%5BColumn1%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20null%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Filled%20Down%22%20%3D%20Table.FillDown(%23%22Added%20Custom%22%2C%7B%22Nodes%22%7D)%2C%0A%20%20%20%20%23%22Filtered%20Rows1%22%20%3D%20Table.SelectRows(%23%22Filled%20Down%22%2C%20each%20not%20Text.Contains(%5BColumn1%5D%2C%20%22NodeName%3A%22))%2C%0A%20%20%20%20%23%22Replaced%20Value%22%20%3D%20Table.ReplaceValue(%23%22Filtered%20Rows1%22%2C%22NodeName%3A%22%2C%22%22%2CReplacer.ReplaceText%2C%7B%22Nodes%22%7D)%2C%0A%20%20%20%20%23%22Trimmed%20Text%22%20%3D%20Table.TransformColumns(%23%22Replaced%20Value%22%2C%7B%7B%22Nodes%22%2C%20Text.Trim%2C%20type%20text%7D%7D)%2C%0A%20%20%20%20%23%22Grouped%20Rows%22%20%3D%20Table.Group(%23%22Trimmed%20Text%22%2C%20%7B%22Nodes%22%7D%2C%20%7B%7B%22SW%22%2C%20each%20_%5BColumn1%5D%7D%7D)%2C%0A%20%20%20%20%23%22Create%20Table%22%20%3D%20Table.FromColumns(%20%23%22Grouped%20Rows%22%5BSW%5D%2C%23%22Grouped%20Rows%22%5BNodes%5D)%0Ain%0A%20%20%20%20%23%22Create%20Table%22%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EPlease%20check%20in%20attached%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294107%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294107%22%20slang%3D%22en-US%22%3EHi%20Sergei%20Baklan%2C%20thank%20you%20for%20that%20script%20and%20the%20output.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20never%20used%20Power%20Query%20before%20and%20I'm%20a%20bit%20lost%20at%20the%20moment.%20Could%20you%20kindly%20explain%20or%20show%20me%20how%20to%20do%20step%20by%20step%20on%20this%3F%3CBR%20%2F%3E%3CBR%20%2F%3ESorry%20for%20the%20inconvenience%20sir%2C%20I%20hope%20you%20understand.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294474%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294474%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1026096%22%20target%3D%22_blank%22%3E%40TB_VN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOkay%2C%20you%20need%20to%20invest%20some%20time%20first%2C%20with%20Power%20Query%20it's%20not%20like%20take%20some%20formula%2C%20adjust%20the%20range%20and%20use%20it.%20Patterns%20exist%2C%20but%20first%20you%20shall%20to%20understand%20how%20PQ%20works.%3C%2FP%3E%0A%3CP%3EI'd%20suggest%20to%20find%20in%20File-%26gt%3BNew%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20230px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275637i8042B60DABA39292%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eto%20learn%20the%20basics%2C%20after%20that%20take%20our%20file%20open%20PQ%20and%20check%20step%20by%20step%20how%20it%20works.%20On%20ribbon%20click%20on%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20226px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275638i708A06D8AA2B7EBB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eand%20in%20right%20pane%20double%20click%20on%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20352px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275639i5B4809092F6FEEDD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPower%20Query%20editor%20will%20be%20opened%2C%20some%20time%20takes%20to%20refresh%20the%20data%2C%20and%20here%20in%20right%20pane%20you%20may%20check%20step%20by%20step%20which%20transformations%20are%20applied%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20255px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275641i1CCD2A9CA36ADA35%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAfter%20you%20are%20ready%20I%20make%20explain%20each%20step%20in%20details%20if%20any%20questions.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294498%22%20slang%3D%22en-US%22%3ERe%3A%20Read%20a%20list%20of%20Node%20Name%20and%20its%20software%20name%2C%20then%20find%20the%20next%20Node%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294498%22%20slang%3D%22en-US%22%3EI%20did%20some%20google%20search%20about%20PQ%20and%20somehow%20understood%20some%20of%20the%20pics%20you%20posted%20it%20there.%20I%20will%20go%20thru%20the%20rest%20today.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20sir%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

 

Newbie here....I have a question.  What's the best way to read from a txt file that contains a list of Node Name and its Software Name, set it in a column1.....then reads the next Node Name and display in the second column2, etc...

 

Expected Output:

Node Name: C1                          Node Name: C2                               Node Name: C3

sw1                                             swname                                           swname

swname                                      swname                                           swname

etc....

Each Node Name column can have as many as between 20 to 300 sw under them.

 

Can someone help?  The text file is has a single column consists of Node Name follow by software name.

 

Thanks in advance,                         

14 Replies
Excel has built in command DATA then Get External data,, allows to import data from Text file also, where every record must be in a Row, and either separated by Space or Comma.

@Rajesh-S 

 

I know that feature, but since my dataset is on a one long column without any separated commas, how can I set it into cols and rows per Node Name is the question.

@TB_VN 

How do we know that the text in one row is node name and in another one is software name? Perhaps you may share small sample file to illustrate.

@Sergei Baklan 

Text file contains:

NodeName: Server1

sw

sw

sw

sw

sw

etc..

NodeName: Server2

sw

sw

sw

sw

sw

sw

sw

sw

sw

sw

etc...

NodeName: Server3

sw

sw

sw

sw

sw

sw

etc...

 

Does this help?

 

The text will say "Node Name: Server1"...etc, same goes for Software Name: nameofsw in front it. These are probably the keywords you're after?

@TB_VN 

Yes, that's more clear now, thank you.

I'd use Power Query for such transformation. Source could be CSV file as in your tag, in my sample that's the column named "range". In brief: query it, create another column with node names against each record, group by nodes without aggregation creating list of software for each node, create table from these lists.

It looks like

image.png

and M-script is

let
    Source = Excel.CurrentWorkbook(){[Name="range"]}[Content],
    #"Filtered Rows" = Table.SelectRows(Source, each ([Column1] <> null)),
    #"Added Custom" = Table.AddColumn(
        #"Filtered Rows",
        "Nodes",
        each
            if Text.Start([Column1],9)="NodeName:"
            then [Column1]
            else null
    ),
    #"Filled Down" = Table.FillDown(#"Added Custom",{"Nodes"}),
    #"Filtered Rows1" = Table.SelectRows(#"Filled Down", each not Text.Contains([Column1], "NodeName:")),
    #"Replaced Value" = Table.ReplaceValue(#"Filtered Rows1","NodeName:","",Replacer.ReplaceText,{"Nodes"}),
    #"Trimmed Text" = Table.TransformColumns(#"Replaced Value",{{"Nodes", Text.Trim, type text}}),
    #"Grouped Rows" = Table.Group(#"Trimmed Text", {"Nodes"}, {{"SW", each _[Column1]}}),
    #"Create Table" = Table.FromColumns( #"Grouped Rows"[SW],#"Grouped Rows"[Nodes])
in
    #"Create Table"

Please check in attached file.

Hi Sergei Baklan, thank you for that script and the output.

I have never used Power Query before and I'm a bit lost at the moment. Could you kindly explain or show me how to do step by step on this?

Sorry for the inconvenience sir, I hope you understand.

@TB_VN 

Okay, you need to invest some time first, with Power Query it's not like take some formula, adjust the range and use it. Patterns exist, but first you shall to understand how PQ works.

I'd suggest to find in File->New

image.png

to learn the basics, after that take our file open PQ and check step by step how it works. On ribbon click on

image.png

and in right pane double click on

image.png

Power Query editor will be opened, some time takes to refresh the data, and here in right pane you may check step by step which transformations are applied

image.png

After you are ready I make explain each step in details if any questions.

I did some google search about PQ and somehow understood some of the pics you posted it there. I will go thru the rest today.

Thank you sir

@TB_VN 

Great. In attached file open the query in advanced editor, I added comments to each step. 

Alternatively you may right click on query name in right pane, Copy, open Notepad++ or Notepad and Paste. Text of M-script will be here. 

I got down to this line:
= Table.Group(#"Trimmed Text", {"Nodes"}, {{"SW", each _[Column1]}}) and it says "Trimmed Text" wasn't recognized. Make sure it's spelled correctly.

What does it trim? Does it remove the extra for text from Nodes and sw?
Also, what if the NodeName is Node Name, a space in between, does it cause any kind of errors if it looks for Node Name and not NodeName? When I try your sample, I changed from NodeName: to Node Name: it seems to stops working, even when I changed your script to have a space in between Node Name? It returns Null, or maybe I need to do a Filled Down all the way?

Another question, this line: if Text.Start([Column1],9)="NodeName:", what if my line is not all the same, will it know when the next Node Name to stop and start a new column header?

Sorry sir if I asked too many dumb questions and making you repeating stuff again, but thanks for being very patience with me as I'm picking up this and learn how to use this PQ tool.

I hope you don't mind me asking all these questions sir.
Nevermind about the Trimmed Text, I went back and saw what you did to it. It deleted the extra space in front on the Server1.
:)....still learning

@TB_VN 

Node Name, NodeName, nodename are all different. You may replace one by one all possible variants. Alternatively, if you always have a colon (:) before server name, you may split this column on two using ":" as delimiter. After that remove first of these two columns.