-1

So my table looks like this

20     1
25     1
28     1

Is there a way to have Excel create rows that contain the missing numbers?

The end result would look like this.

20     1
21     0
22     0
23     0
24     0
25     1
26     0
27     0
28     1
2
  • 1
    Elaborate please as to why you can't just do this manually? There are many ways to tackle your question. We need more details.
    – Eric F
    Jan 7, 2015 at 19:25
  • That was just an example, my actual table has a lot more rows so doing it manually isn't feasible. The value in the second column doesn't matter.
    – Hossw
    Jan 7, 2015 at 19:42

1 Answer 1

0

First put 20,21,22,23... in a column you need to enter 20 in A1, in cell E1 enter 1 and then enter =A1+$E$1 in A2. After you did that pull the cell A2 down. that will make you 22,23...

Put you values in row G: in G1 20, G2 25 and G3 28.
In cell B1 put this formula =IF(VLOOKUP(A1;G:G;1;1)=A1;1). After that pull the cell B1 down.

In B1 put =IF(VLOOKUP(A1;G:G;1;1)=A1;1;0) because if you put =IF(VLOOKUP(A1;G:G;1;1)=A1;1) there will be FALSE instead of 0.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .