4 Replies Latest reply: Dec 10, 2012 7:05 AM by craigjames RSS

    Using the keep function, how do I get the previous value whereby a certain criteria is met?

      I am reading data from excel. My data reads something like:


      ColumnX, ColumnY

      1             ,  Asia

      2             , Japan

      2             , China,

      3,            , Beijing.


      So for instance - with Japan, if I want the continent I will say: keep(ColumnY) as Continent. 


      The problem is with China. How would I get Asia as the continent? I need to somehow use the keep with some type of 'where' criteria, where the last value = 1.


      Maybe I can use a nested if such as if(keep(Columnx=1(Keep(Keep(Column1), the problem is I might have 30 countries in a row, all from the same continent.