averageifs/or ?

reevesk

New Member
Joined
May 4, 2016
Messages
6
Forgive me as this is my first time posting on this site, or asking for help over text for that matter. I hope I am able to clearly explain what I’m needing.

I have a report on one tab with formulas pulling from numerous different tabs in the same sheet. The report/formulas split the data into current month, previous month, and year to date. We also want to add in a drop down at the first “year to date” cell (D3) to change it to “year to period.” I’ve got the drop down working (using data validation), but now I need to edit the formulas in these cells so that once the drop down in cell D3 changes to year to period, the formula only pulls year to period data.

Currently, my formula (that works correctly) in my YTD column looks like this:
=AVERAGEIFS('Tab 1'!$O:$O,'Tab 1'!$A:$A,YEAR($B$5), 'Tab 1'!$C:$C,$A$38)
What I think I need is a formula that says “If cell D3=Year-to-Date, use this formula(above), but if cell D3=Year-to-Period, use a slightly different formula (which I haven't put together yet...)

So something along the lines of =averageifs(or(

(it has to be averageifS because I have more than one criteria)


I really don’t know if this is going to make sense to anyone…. But any input is appreciated!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Welcome to the board

Sounds more like an IF

=IF(D3="Year-to-Date",AVERAGEIFS('Tab 1'!$O:$O,'Tab 1'!$A:$A,YEAR($B$5), 'Tab 1'!$C:$C,$A$38),slightlydifferentformulagoeshere)
 
Upvote 0
Welcome to the board

Sounds more like an IF

=IF(D3="Year-to-Date",AVERAGEIFS('Tab 1'!$O:$O,'Tab 1'!$A:$A,YEAR($B$5), 'Tab 1'!$C:$C,$A$38),slightlydifferentformulagoeshere)


Yes!!! That absolutely helped me.


Now just to figure out my "slightly different formula" pulling year to period/month.


Thank you so much for your quick response!
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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