Calculate base on dynamic columns

minhhieule89

Board Regular
Joined
Jul 16, 2014
Messages
68
I have a table similar like below, I want to do a formula so that depends on the value of the first row (T1, T2 or T3) it will take the corresponding value and subtract the Date column then sum the total value.


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]T1[/TD]
[TD]T2[/TD]
[TD]T3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1/1/2017[/TD]
[TD]7/1/2017[/TD]
[TD]8/1/2017[/TD]
[TD]9/1/2017[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1/1/2016[/TD]
[TD]7/10/2017[/TD]
[TD]8/15/2017[/TD]
[TD]9/10/2017[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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