Need to average 3 non continuous cells based on text in a different cell

rlange

New Member
Joined
May 22, 2020
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hi. Thanks in advance! I'm trying to average cells F13, F20 and F27 but I only want to count any of them if their associated cell above it (F12, F19 and F26) contain the words "Dilution Used". If Dilution Used does not appear in F12, F19 or F26, then I don't want to include the associated cell in the average. Hopefully that makes sense. I've tried numerous functions and nothing produces a workable value. I usually get some sort of error. Help? Thank you!!!

Oh the average will go in cell F30
 

Attachments

  • Capture.PNG
    Capture.PNG
    4.9 KB · Views: 9

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
As long as no other cells in between could contain the text "Dilution used" then just do it as one range, the formula will ignore the other cells.

=AVERAGEIFS(F13:F27,F12:F26, "Dilution Used")
 
Upvote 0
As long as no other cells in between could contain the text "Dilution used" then just do it as one range, the formula will ignore the other cells.

=AVERAGEIFS(F13:F27,F12:F26, "Dilution Used")
Hi Jason. Thank you! I put that formula in F30 and produced a new error: #DIV/0! Any ideas why that happened?
 
Upvote 0
That would mean either no cells in F12:F26 contain the text "Dilution Used" or that the cells immediately above "Dilution Used" do not contain valid numbers.
 
Upvote 0
That would mean either no cells in F12:F26 contain the text "Dilution Used" or that the cells immediately above "Dilution Used" do not contain valid numbers.
Hi Jason. Would numbers like these be invalid? There are numbers in the cells above and below the words "Dilution Used".
 

Attachments

  • Capture.PNG
    Capture.PNG
    5.6 KB · Views: 6
Upvote 0
As long as they are proper numbers in scientific format then it works, they look fine from the screen capture.

Check the cells with the text for typos, stray spaces, etc.
Book2
F
10100
111.00E-05
12Dilution Used
131.04E+08
14
15
16
17100
181.00E+06
19Dilution Used
201.57E+09
21
22
23
24100
251.00E+07
26Dilution Not Used
271.27E+09
28
29
308.37E+08
Sheet4
Cell Formulas
RangeFormula
F30F30=AVERAGEIFS(F13:F27,F12:F26, "Dilution Used")
 
Upvote 0
Quite likely an issue with your data. If still unresolved, post that sample data with XL2BB so we can copy exacly what you have rather than relying on us copying it manually from a picture.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

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