Which Function

rssl2000

New Member
Joined
Oct 18, 2017
Messages
26
Hello,
I'm trying to figure out which function or combination of functions to use. I'm trying to take the average from one column of data, but the data is chosen from another column of data, but in the same row. In the example below, column A is the criteria, but I want the number averaged to come from row B. So if I choose "1", the average is (15+19)=17.

A B
1 15
2 13
3 10
1 19
2 22
3 17

Thanks, Adam
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Thanks. Tried both AVERAGEIF with an AND & AVERAGEIFS, but always always got a #DIV/0! response. I do have three criteria.
 
Upvote 0
I do have three criteria.
You only told us 1
For multiple criteria, it's averageifS

=AVERAGEIF(C1:C6,A1:A6,1,B1:B6,"x")
averages column C if A=1 and B="x"


#Div/0! error will mean 0 rows met the criteria.
 
Last edited:
Upvote 0
Thanks, have you ever had any issues where when you select a number from a cell it doesn't work, but if you enter the same number in the Function Argument it works? That appears to be my issue. I am using a < or > in the Function. The numbers show as "General".
 
Upvote 0
=AVERAGEIFS('2000 Data'!F2:F8761,'2000 Data'!B2:B8761,"<A11",'2000 Data'!B2:B8761,"<B11",'2000 Data'!B2:B8761,">=1")
 
Upvote 0
What exactly do you entries in column B look like?
By "u22", do you mean the literal text "u22", or what is in cell u22?
If you mean the cell, you need to remove the quotes from around it. Surrounding anything in quotes means to treat whatever is inside the quotes as literal text.

If you do mean literal text, then do you have a combination of numbers AND letters in column B, as you seem to be looking for text values or "u22" and numeric values less than 1, and nothing can meet both those conditions at the same time.
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

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