Locking a cell reference to a cell location

jimp823

New Member
Joined
May 10, 2016
Messages
7
Hi,

I have a spreadsheet where I am comparing two lists of chronological transactions based on their amount. For example column B has an amount for the transaction from the first list and column D has a transaction from the second list. In column C I have the formula '=B1-D1' and if they sum to 0 I know they match.

If they don't sum to zero, that means there's another transaction in one of the lists that isn't in the other list, and I can identify the missing transaction. I then insert cells above the list with the missing transaction so that the next set of transactions align. However, when the list of transactions shifts down, the formula in column C changes the cell target to move with it. Ex. If I shift down the list in column D starting in row 2, the formula changes from '=B2-D2' to '=B2-D3'.

Is there a way to lock the formula in Column C so that is stays the same no matter what I do with the other columns?

Right now, the only way I can continue auditing my transactions is by recopying the formula down column C to the bottom again.

Here's what the table looks like:

Transaction NameAmount SumAmountTransaction Name
Transaction 1606Transaction 1
Transaction 2743Transaction 3
Transaction 3321Transaction 4
Transaction 41-34Transaction 5
Transaction 54-48Transaction 6

<tbody>
</tbody>


Here's what it looks like after I've shifted the cells in columns D and E down to match up:

Transaction NameAmountAmountTransaction Name
Transaction 1606Transaction 1
Transaction 274
Transaction 3323Transaction 3
Transaction 41-31Transaction 4
Transaction 54-44Transaction 5

<tbody>
</tbody>


And here's what I need, which right now I can only acheive by recopying the formula from C2 all the way down the column again:

Transaction NameAmountSumAmountTransaction Name
Transaction 1606Transaction 1
Transaction 277
Transaction 3303Transaction 3
Transaction 4101Transaction 4
Transaction 5404Transaction 5

<tbody>
</tbody>
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
In C2, copied down
=B2-OFFSET(C2,0,1)

Note though that OFFSET & INDIRECT are volatile functions so can slow your sheet if used a lot.
If you wanted to avoid the volatile function you could instead use
=B2-INDEX(D:D,ROW())
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,652
Members
448,975
Latest member
sweeberry

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