Make number change as it goes down

borabora12

New Member
Joined
Aug 2, 2008
Messages
12
A1: =OFFSET('1'!$A$1,'1'!$N$1-38,0)
A2: =OFFSET('1'!$A$1,'1'!$N$1-37,0)
A3: =OFFSET('1'!$A$1,'1'!$N$1-36,0)
A4: =OFFSET('1'!$A$1,'1'!$N$1-37,0)

As I drag the little sqaure box on the bottom right of the cell is there anyway for excel to automatically change the number from 38 to 37 to 36 to 35 etc etc.? Thanks in advance.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
A better formula would be

=INDEX('1'!$A:$A, 38-$N$1-ROW(), 1)

its non-volatile and will adjust as dragged down.
 
Upvote 0
A1: =OFFSET('1'!$A$1,'1'!$N$1-38,0)
A2: =OFFSET('1'!$A$1,'1'!$N$1-37,0)
A3: =OFFSET('1'!$A$1,'1'!$N$1-36,0)
A4: =OFFSET('1'!$A$1,'1'!$N$1-37,0)

As I drag the little sqaure box on the bottom right of the cell is there anyway for excel to automatically change the number from 38 to 37 to 36 to 35 etc etc.? Thanks in advance.
What's in cell N1?
 
Upvote 0
A better formula would be

=INDEX('1'!$A:$A, 38-$N$1-ROW(), 1)

its non-volatile and will adjust as dragged down.
Maybe, but that formula is dependent upon which row it's entered on. Insert a new row before the formula cell and the formula breaks.
 
Upvote 0
Thank you so much!

I got it to work by tweaking it a little bit but you definitely pointed me in the right direction by introducing me to indexing. Thanks!
 
Upvote 0
Aladin Akyurek said:
In order to robustify the formula against row insertions...

ROW()-ROW($A$1)+1

or bettter:

ROWS($A$1:A1)
There's no need to make the column absolute.

ROWS(A$1:A1)
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,848
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top