Formula to calculate depands on headers

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,284
Office Version
  1. 2013
Platform
  1. Windows
Hello All,
I will need help with below tables calculation...
There are huge datas all the way down from column A.
So if its possible I need to place formulas to get proper calculatin base on given table below starts from column J
Many Thanks.



[TABLE="width: 644"]
<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]COLUMN-A-[/TD]
[TD]COLUMN-C-[/TD]
[TD]COLUMN-D-[/TD]
[TD][/TD]
[TD]COLUMN-J-[/TD]
[TD]COLUMN-K-[/TD]
[TD]COLUMN-L-[/TD]
[TD]COLUMN-M-[/TD]
[/TR]
[TR]
[TD]January[/TD]
[TD]500[/TD]
[TD]apple[/TD]
[TD][/TD]
[TD]MONTHS[/TD]
[TD]APPLE[/TD]
[TD]ORANGE[/TD]
[TD]BANANA[/TD]
[/TR]
[TR]
[TD]January[/TD]
[TD]250[/TD]
[TD]orange[/TD]
[TD][/TD]
[TD]January[/TD]
[TD]500[/TD]
[TD]650[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]January[/TD]
[TD]400[/TD]
[TD]orange[/TD]
[TD][/TD]
[TD]February[/TD]
[TD]1180[/TD]
[TD]1200[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]February[/TD]
[TD]600[/TD]
[TD]apple[/TD]
[TD][/TD]
[TD]March[/TD]
[TD] [/TD]
[TD]650[/TD]
[TD]750[/TD]
[/TR]
[TR]
[TD]February[/TD]
[TD]1200[/TD]
[TD]orange[/TD]
[TD][/TD]
[TD]April[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]February[/TD]
[TD]580[/TD]
[TD]apple[/TD]
[TD][/TD]
[TD]May[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]March[/TD]
[TD]650[/TD]
[TD]orange[/TD]
[TD][/TD]
[TD]June[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]March[/TD]
[TD]750[/TD]
[TD]banana[/TD]
[TD][/TD]
[TD]July[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]August[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]September[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]October[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]November[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]December[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi,

Assuming Year is Not a factor, and your Column A and J are Text...

Use K2 formula copied down and across, OR, if you Don't want 0 (zero) to show, use O2 formula in K2 copied down and across.

Change/Adjust Cell References/Range as needed:


Book1
ABCDEFGHIJKLMNOPQ
1January500appleMONTHSAPPLEORANGEBANANA
2January250orangeJanuary5006500500650
3January400orangeFebruary11801200011801200
4February600appleMarch0650750650750
5February1200orangeApril000
6February580appleMay000
7March650orangeJune000
8March750bananaJuly000
9August000
10September000
11October000
12November000
13December000
Sheet462
Cell Formulas
RangeFormula
K2=SUMIFS($B$1:$B$10,$A$1:$A$10,$J2,$D$1:$D$10,K$1)
O2=IFERROR(1/(1/SUMIFS($B$1:$B$10,$A$1:$A$10,$J2,$D$1:$D$10,K$1)),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,712
Messages
6,174,031
Members
452,542
Latest member
Bricklin

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