FlyerTalk Forums - View Single Post - Excel Question
Thread: Excel Question
View Single Post
Old Jan 10, 2008 | 9:04 pm
  #9  
Teacher49
FlyerTalk Evangelist
20 Years on Site
 
Join Date: Jan 2004
Location: San Francisco
Programs: AA 3mm Plat
Posts: 10,068
Originally Posted by Efrem
Instead of the formula that calculates from the row above, or dragging the first few numbers to fill in the rest (which will populate those cells with constants, which may be a problem if you delete a row) you can also use this formula in each cell of the area you want to contain numbers:

=row() - 3

The row() function equals the row number of wherever it is: if it's anywhere in row 4 it equals 4, anywhere in row 5 it equals 5, and so on. It must be followed by () for arguments even though it doesn't take any. Subtract 3 if you want row 4 to contain the number 1; adjust this for however many un-numbered rows you have at the top.
Originally Posted by Meerkat
Never heard of that function before. Thanks for that - it's a really elegant solution. ^
Not only elegant, but I could actually make that one work! Thanks, Efrem! And also to all who attempted to educate this Excel illiterate!
Teacher49 is offline