How to Reference An Offset to the Current Cell in a Worksheet Formula

CurtisD

New Member
Joined
Oct 4, 2019
Messages
15
Hi,

I have a worksheet with thousands of rows. Each row contains several cells with formulas that reference other cells on that row.
For example, cell E1 has this formula: =A1+B1. Cell F1 has this formula: =C1+D1.
The same kinds of formulas appear on each row. For example, cell E100 has this formula: =A100+B100.

Is there a way to write a cell's formula so that it uses column offsets from the cell? For example, could the formula for E1
be written as: =OFFSET([currentcell],0,-4)+OFFSET([currentcell],0,-3) where [currentcell] identifies the address of the current cell.

If I could do this, then every formula in a given column would be the same, and would be easier to maintain.

I realize I can drag the fill handle for a formula vertically, and the row references will adjust automatically.
Nevertheless, I would like to know if cell formulas can be written using row and column offsets from the current cell.

Thanks!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
For example, could the formula for E1
be written as: =OFFSET([currentcell],0,-4)+OFFSET([currentcell],0,-3) where [currentcell] identifies the address of the current cell.

Hi, can't you just replace [currentcell] with the actual current cell reference. i.e. for your F1 example:
=OFFSET(F1,0,-4)+OFFSET(F1,0,-3)

But a better option might be to look at using tables and structured references - google will help if you need more information.
 
Upvote 0
I have done something very similar using the index functions and two "index" references in the rows 2 and 3 of each column
To show you how this works put 1 into E2 and 2 into E3, then put =e2+2 into F2 and E3+2 into F3.
then in E4 put the following equation:
Code:
=INDEX($A4:$D4,1,E$2)+INDEX($A4:$D4,1,E$3)
You can then copy this down coolumn E and across to column F and it does what you asked for.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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