Formula to Filter 1 or more columns based on criteria and then perform basic math on another column (based on the filter)

queysoft

New Member
Joined
Aug 3, 2021
Messages
49
Office Version
  1. 2016
Platform
  1. Windows
HI there - So, I don't have O365 subscription (yet) - trying to get work to buy it for us.

Column A = List of words (example Apple.....Pear.....Orange)
Column B = List of words (example Apple.....Pear.....Orange)
Column C = A number (example 123, 432, 734......n)

In a cell, I would like to automate (or at least enter a formula) to Filter column A on a certain word (Apple) and then either AVERAGE / MAX / MIN the filtered values for the word Apple.
Then I would like another formula to do the same using values in column A and B.

It would be nice to make this into a button to click to display the information- Is that possible without using VBA?

Thank you.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
How about
+Fluff 1.xlsm
ABCDEF
1
2Apple92Apple
3Pear80Average69.16667
4Orange65Max92
5Apple39Min39
6Apple66
7Apple84
8Apple76
9Pear44
10Pear82
11Orange15
12Orange50
13Pear63
14Apple58
15
Main
Cell Formulas
RangeFormula
F3F3=AVERAGEIFS(C2:C100,A2:A100,F2)
F4F4=MAX(IF(A2:A100=F2,C2:C100,""))
F5F5=MIN(IF(A2:A100=F2,C2:C100,""))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
This looks perfect - Is it possible to enter multiple entries? So, F2 says APPLE but what if i want F3 to say PEAR as well? Can i Put an AND Statement in somewhere (like below)

=AVERAGEIFS(C2:C100,A2:A100,F2&F3)
=MAX(IF(A2:A100=F2&A2:A100=F3,C2:C100,""))
 
Upvote 0
Assuming you mean OR not AND, then
+Fluff 1.xlsm
ABCDEF
1
2Apple92PearApple
3Pear80Average66.2
4Orange65Max92
5Apple39Min22
6Apple66
7Apple84
8Apple76
9Pear22
10Pear82
11Orange15
12Orange50
13Pear63
14Apple58
15
Main
Cell Formulas
RangeFormula
F3F3=AVERAGE(IF((A2:A100=E2)+(A2:A100=F2),C2:C100,""))
F4F4=MAX(IF((A2:A100=E2)+(A2:A100=F2),C2:C100,""))
F5F5=MIN(IF((A2:A100=E2)+(A2:A100=F2),C2:C100,""))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Thank you - Let me give this a go. I thank you for your time!!
 
Upvote 0
Hmm - I am getting #value.....then i realised one of the criteria boxes is a formula (hence)........I can easily solve this with a copy / PS......However, I am wondering - do you know of an easy formula to copy the value of a cell with a formula in it without using VBA? So cell A1 has a formula and i want B1 to show the actual value of A1?
 
Upvote 0
It doesn't matter if E2 or F2 are formula results, the formulae I provided will still work.
 
Upvote 0
Hmm - I can get some to work but not others - I must be doing something incorrect. Let me provide some screen shots if you don't mind.........
 
Upvote 0
It would be better if you could supply sample data using the XL2BB add-in.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,375
Members
449,155
Latest member
ravioli44

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