18 Replies Latest reply: Mar 29, 2016 4:06 AM by Gysbert Wassenaar RSS

    Repeating values until null.

    Adnan Rafiq

      Hi everyone.

      Just wanted to pick the brains of the gurus of QV. I want to repeat a value in a column that I get in a table using script, as many times until I find a non-null value in the same a column. So for example sake consider (AS-is)

       

      Header 1Header 2
      42186AB
      CD
      WE
      TT
      RR
      QS
      EF
      42155GH
      IJ
      KL
      SA
      AS
      QW
      MN

       

      I am trying to get, (To Be)

       

      Header 1Header 2
      42186AB
      42186CD
      42186WE
      42186TT
      42186RR
      42186QS
      42155GH
      42155IJ
      42155KL
      42155SA
      42155
      42155

       

      I have tried ALT, PEEK and PREVIOUS but only got values to repeat twice by using PREVIOUS.

      Please help