Auto filling a formula

shina67

Board Regular
Joined
Sep 18, 2014
Messages
138
Hi All,

When autofilling a formula by dragging down, the row number changes in the formula. Is there a way of making the row number stay the same and the column number change.
i.e. =M1000 would become =N1000 in the cell beneath.

Also the same question for dragging across the row. I would want the row number changing and not the column letter.
i.e. =N1000 would become =N1001 in the cell adjacent.

Hope the above makes sense.

Any help would be appreciated as there are over 30,000 cells to apply this to.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
To lock the row number and allow the column to change put a $ sign in front of the Row Number. To lock column put $ in front of Column letter.
if you highlight the cell reference in your first formula in the range you can press F4 to cycle through the different combinations of referencing cells. Then copy down.
There are 4 different reference versions.

here is a microsoft link on it:

 
Upvote 0
To lock the row number and allow the column to change put a $ sign in front of the Row Number. To lock column put $ in front of Column letter.
if you highlight the cell reference in your first formula in the range you can press F4 to cycle through the different combinations of referencing cells. Then copy down.
There are 4 different reference versions.

here is a microsoft link on it:

Hi,

thanks for the reply. That doesn't work. please see below pic. Pic 1 shows the starting formula. If I apply the $ to the formula and drag down Pic2 is what I get.
In pic2 I need the formula to be ='Holiday Tracker'!N$1000.

The same applies if I drag across the row.
 

Attachments

  • pic1.JPG
    pic1.JPG
    29.3 KB · Views: 10
  • pic2.JPG
    pic2.JPG
    30.3 KB · Views: 10
Upvote 0
I though I wrote for you scenario to put the $ in front of the ROW number, so use M$1000 to lock the row value in that column, you copied $M1000 down.

If you want to always reference cell N1000 and never have any formula change then $N$1000
if you always want to show your the value in row 1000 in the rows going down then M$1000 (this will change as you copy to a column)
if you always want to use the value the value in column N as you copy to new columns then $M1000 (this will change as you copy down rows)

Did you look at the link I posted?
 
Upvote 0
The OP needs the column to increment as the formula is dragged down ;)
 
Upvote 0
That's exactly what I am requiring.
Also the row to increment as the formula is dragged across.
 
Upvote 0
As a basic example

Book1
ABCDEFGHIJ
1
2Row increment
31234Column incre 11357
432
553
674
Sheet3
Cell Formulas
RangeFormula
G3:J3G3=OFFSET($A$3,COLUMN(A1)-1,0)
F3:F6F3=OFFSET($A$3,0,ROW(A1)-1)


Edit:
Or a bit more efficient

Book1
ABCDEFGHIJ
1
2Row increment
31234Column incre 11357
432
553
674
Sheet3
Cell Formulas
RangeFormula
G3:J3G3=INDEX($A:$A,COLUMNS($A$1:C$1))
F3:F6F3=INDEX($3:$3,ROWS(B$1:B1))
 
Last edited:
Upvote 0
As a basic example

Book1
ABCDEFGHIJ
1
2Row increment
31234Column incre 11357
432
553
674
Sheet3
Cell Formulas
RangeFormula
G3:J3G3=OFFSET($A$3,COLUMN(A1)-1,0)
F3:F6F3=OFFSET($A$3,0,ROW(A1)-1)


Edit:
Or a bit more efficient

Book1
ABCDEFGHIJ
1
2Row increment
31234Column incre 11357
432
553
674
Sheet3
Cell Formulas
RangeFormula
G3:J3G3=INDEX($A:$A,COLUMNS($A$1:C$1))
F3:F6F3=INDEX($3:$3,ROWS(B$1:B1))
Hi MARK858,

Thanks for that and works brilliantly,

The problem I have is I have 365 rows to populate.
When I've inserted the formula as in your example for the columns across 80 cells I then want to autofill down the 365 rows.
 
Upvote 0
Hi MARK858,

Thanks for that and works brilliantly,

The problem I have is I have 365 rows to populate.
When I've inserted the formula as in your example for the columns across 80 cells I then want to autofill down the 365 rows.
Then use the formula for the across and then reference those cells in the formula down (both formulas are designed to increment in the direction specified)
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,952
Members
449,095
Latest member
nmaske

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