Hello,

I use three columns. The first column is some ID-number for a firm (e.g. A1=1, A2=2, A3=3, etc.). The second column contains a characteristic of that particular firm (for example, firm 1 produces ten cookies per month, then B1=10, firm 2 produces twenty cookies per month, B2=20, etc.). The problem is that there are multiple observations for one firm. How could we use If-statements to automatically assign the number of cookies per month to the correct firm?

What I tried already is something like this: IF(A2=A1;$B$1;$B$2). This works for the first firm, but for the second firm, it only works for the first observation and then I have to adjust the if-statement manually, which takes too much time.