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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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,216,101
Messages
6,128,838
Members
449,471
Latest member
lachbee

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