How to convert 2 column data into multiple columns based on a keyword in a row??

Hi Friends

I have the following input data in 2 columns.

SNo   1
I1  Value
I2  Value
I3 Value
SNo   2
I4  Value
I5  Value
I6  Value
I7  Value
SNo  3
I8  Value
I9  Value
...............
................
SNo N

I want the following output(Multi column)

SNo     1       SNo   2      SNo   3        ........SNo  N
I1      Value   I4    Value  I8    Value            Ix   Value
I2      Value   I5    Value  I9    Value            Iy   Value
I3      Value   I6    Value
                I7    Value

Ultimately I need a multi column output from 2 column input and needs to be segmented at the specified keyword. i.e. in this case SNo

I hope my problem statement is very clear.

Thanks in advance...

---------- Post updated at 11:49 AM ---------- Previous update was at 11:47 AM ----------

Small correction in the output. I7 Value should be below I6 Value. Because of formatting problem while posting it happened like that.

try next script

#!/usr/bin/ksh
N=3
count=1
filenames=" "
while [[ $count -lt  $N+1  ]];do
      awk 'BEGIN {RS="SNo"} /No[[:space:]]*'$count'/ {print $0} ' infile > /tmp/tmpf$count
      filenames=$filenames" /tmp/tmpf$count"
   (( count += 1 ))
done

paste $filenames

I edited th post to rewrite the code to replace the paste command with awk command to get best output from the old script:

#!/usr/bin/ksh
N=3
count=1
filenames=" "
while [[ $count -lt  $N+1  ]];do
      awk 'BEGIN {RS="SNo"} /No[[:space:]]*'$count'/ {print $0} ' infile >  /tmp/tmpf$count
   (( count += 1 ))
done

count=2
while [[ $count -lt  $N+1  ]];do
   awk 'NR==FNR { a[c=FNR]=$0; next } { printf "%-18s\t%-18s\n", a[FNR], $0 } END { for(i=FNR+1;i<=c;i++) print a }' /tmp/tmpf1  /tmp/tmpf$count > /tmp/tfo
   cat /tmp/tfo > /tmp/tmpf1
   (( count += 1 ))
done
cat /tmp/tmpf1



# ./s1
No   1                   No   2                  No  3
I1  Value               I4  Value               I8  Value
I2  Value               I5  Value               I9  Value
I3  Value               I6  Value
                           I7  Value