How do you substract 2 cells based on its location

Paul Naylor

Board Regular
Joined
Sep 2, 2016
Messages
99
Office Version
  1. 365
  2. 2003 or older
Platform
  1. Windows
  2. Mobile
  3. Web
Hoping someone can help. I'm wanting a dynamic function that will subtract one cell from another based on the locations I specify

E,g,

I've got a list of times in column A , but want to be able to subtract different cells by specifying their locations , so I have 2 random cells e.g H5 & H6 and want to be able to specify say cell A6 in H5 and cell A20 in cell H6 ang have a formula which say subtracts the values of my selections .

Hope I've explained it well enough ?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
If you want to subtract cells which addresses are written in other cells use INDIRECT function.

like:
Excel Formula:
=INDIRECT(H5)-INDIRECT(H6)


1726820898263.png
 
Upvote 0

Forum statistics

Threads
1,223,101
Messages
6,170,116
Members
452,302
Latest member
TaMere

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