Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is my table

...A............
1  1
2  
3  
4  
5  9

I know the minimum value (A1=1) and I know the maxiumum value (A5=9). Now I want to fill the rows in between with the numbers leading up to the maximum value.

So it looks like this:

...A............
1  1
2  3
3  5
4  7
5  9

How can I do this in iWork Numbers? (maybe its the same as in Excel?)

share|improve this question
up vote 0 down vote accepted

Put this into cell A2 (this works for Excel 2007) and drag down:

=A1+($A$5-$A$1)/(ROW($A$5)-ROW($A$1))

Basically, this figures out how many rows between your first and last, then what the difference is between the two values, then adds that value-per-cell calculation to the preceding cell.

share|improve this answer
    
Thanks it worked in Numbers too. – mdc Sep 22 '10 at 19:55

In Excel, select the range that includes your starting and ending cells. In the Home ribbon, in the Editing section, click Fill, select Series, click OK and you're done.

share|improve this answer
    
Thanks, I actually dont have Excel so I cant test it but Im sure it works :) – mdc Sep 22 '10 at 19:57
    
+1 - This is good to know if you are using just Excel! – JNK Sep 22 '10 at 20:02
    
@mdc: Well, your title and one of your tags say "Excel". – Dennis Williamson Sep 23 '10 at 2:52
    
Thats because there could be a solution that works in both Numbers and Excel (like the one JNK provided). – mdc Sep 23 '10 at 5:46

Here's my VBA answer, that will be easy to modify to do what you want.

share|improve this answer

You must log in to answer this question.

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