Formula help

hkelly393

New Member
Joined
Jun 25, 2019
Messages
13
I'm trying to work a formula that searches a column header for a particular quarter, in this example, Q1-2021 and then finds the Total Revenue line and pulls the value from the same column with the matching header;

I have this but it won't search the quarter first.
=SUMIF('ELM JAN'!$A:$A, " Total Revenue", 'ELM JAN'!$B:$B)
 

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
Try INDEX/MATCH
See example below.

Book1
ABC
1Q1-2021Q4-2020
2Line152
3Line2104
4Line3156
5Line4206
6Line5258
7Line63014
8Total Revenue10520
9
10FindQ1-2021
11105
Sheet1
Cell Formulas
RangeFormula
B11B11=INDEX($B$8:$C$8,MATCH($B$10,$B$1:$C$1,0))
 
Upvote 0
Hi,

If you also need the "Month Ending" as criteria, you can use this:

If the Revenue Line may change month to month, use B15 formula,
otherwise if the Revenue line is Static, you just need to change from SUMIF to SUMIFS:

Book3.xlsx
ABCDE
1
2Q1-2021Q4-2020Q4-2020
3Month EndingMonth EndingMonth Ending
41/31/202112/31/202011/30/2020
5Line1527
6Line21048
7Line31569
8Line420610
9Line525811
10Line6301412
11Total Revenue1052013
12
13Quarter-YearQ1-2021Q4-2020
14Month Ending1/31/202111/30/2020
15Total Revenue10513
1610513
Sheet837
Cell Formulas
RangeFormula
B15:C15B15=SUMPRODUCT(($B2:$Z2=B13)*($B4:$Z4=B14)*($A5:$A11=$A15)*$B5:$Z11)
B16:C16B16=SUMIFS($B11:$Z11,$B2:$Z2,B13,$B4:$Z4,B14)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,873
Messages
6,122,029
Members
449,061
Latest member
TheRealJoaquin

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