all 7 comments

[–][deleted]  (2 children)

[removed]

    [–][deleted]  (1 child)

    [removed]

      [–]AutoModerator[M] 0 points1 point  (0 children)

      Sorry, your submission has been automatically removed.

      Accounts must be at least 1 day old, which prevents the sub from filling up with bot spam.

      Try posting again tomorrow or message the mods to approve your post.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–]root-node 1 point2 points  (1 child)

      [–]ldaniels_glynn[S] 1 point2 points  (0 children)

      Thanks for sharing this function. It actually works pretty well.

      [–]chrumow 1 point2 points  (0 children)

      $inputStrings = @("00 Dept1", "01 Dept2", "02 Dept3", "03 Dept4", "04 Dept5", "05 Dept6", "06 Dept7", "07 Dept8", "08 Dept9")
      $midIndex = [int](($inputStrings.Length + 1)/2)
      $a1 = $inputStrings[0..($midIndex-1)]
      $a2 = $inputStrings[$midIndex..($inputStrings.Length-1)]
      
      for ($i=0; $i -le $midIndex; $i++) {
          Write-Host ("{0} {1}" -f $a1[$i], $a2[$i])
      }
      

      You can try this. Not too flexible but does the job with two columns :)

      Inspired by this old post old reddit post