Average data in column IF specific text in another

iherndon

Board Regular
Joined
May 24, 2009
Messages
102
Having some trouble working this out, I keep getting #VALUE!.

I have two columns, Column A that indicates Staffed or Unstaffed, and Column B which has data I want to average. I'm attempting to enter a formula into a cell elsewhere that will basically only calculate the Column B data if Column A contains the text 'Staffed'.

Thanks for any assistance!
 
Something else just occurred to me; if I want to base the average off of fields with "staffed" and another keyword, how would the second criteria be formatted into the formula? Also, is it case sensitive?

Thanks!
Is the other keyword in the same column as "staffed" or is it in another column?

If it's in the same column then what you want is an average if column A = "staffed" OR "other_keyword". If the other keyword is in a different column then you want an average if column A = "staffed" AND other column = "other_keyword".

Case is not a factor (unless you want it to be).
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Is the other keyword in the same column as "staffed" or is it in another column?

If it's in the same column then what you want is an average if column A = "staffed" OR "other_keyword". If the other keyword is in a different column then you want an average if column A = "staffed" AND other column = "other_keyword".

Case is not a factor (unless you want it to be).

Yes, they would be two totally separate columns. Thank you again for your helpful reply.
 
Upvote 0
Right now I'm working on the exact formatting to use for it, but believe it to not be correct so far.
 
Upvote 0
Actually I think I JUST got it.

=AVERAGEIFS(P9:P268, B9:B268, "Smith, John", J9:J268, "Staffed")

I left out the s in averageifs. P is the column with Response Time data I was looking to average based on specific rows in column B being a specific name while J also contain Staffed.
 
Upvote 0
Actually I think I JUST got it.

=AVERAGEIFS(P9:P268, B9:B268, "Smith, John", J9:J268, "Staffed")

I left out the s in averageifs. P is the column with Response Time data I was looking to average based on specific rows in column B being a specific name while J also contain Staffed.
OK, the formula is syntactically correct.

Good deal. Thanks for the feedback! :cool:
 
Upvote 0
Actually I think I JUST got it.

=AVERAGEIFS(P9:P268, B9:B268, "Smith, John", J9:J268, "Staffed")

I left out the s in averageifs. P is the column with Response Time data I was looking to average based on specific rows in column B being a specific name while J also contain Staffed.

Right... Thanks for providing feedback.
 
Upvote 0
Really opens up a lot of options with the types of reporting I'm looking to do!:)

Right now I have two criteria that would be AND. After getting the AVERAGEIFS function to work, I'm seeing a need to have a third criteria that excludes any that contain a specific word.

Using Excel 2007's Function Arguments window, I've selected the fields for Criteria_range3 and am now looking to ender the Criteria3 to exclude cells with specific text. looks like it only gives the option for =?
 
Upvote 0
Really opens up a lot of options with the types of reporting I'm looking to do!:)

Right now I have two criteria that would be AND. After getting the AVERAGEIFS function to work, I'm seeing a need to have a third criteria that excludes any that contain a specific word.

Using Excel 2007's Function Arguments window, I've selected the fields for Criteria_range3 and am now looking to ender the Criteria3 to exclude cells with specific text. looks like it only gives the option for =?
<> means not equal

To exclude some item you would define it as "<>whatever".

For example, to exclude cells in column X that contain "yes":

=AVERAGEIFS(P9:P268, B9:B268, "Smith, John", J9:J268, "Staffed", X9:X268,"<>Yes")
 
Upvote 0
Aah that worked, thanks! Is there anything special to do in this example?

The keyword I want to use is for any cell that contains the letters 'delay'. <>delay obviously covers that, but I seem to be missing some that perhaps had additional letters such as 'delayed' being present in the field's text. Does it have to be exact; or can I <> the text 'delay' and 'delayed' with just 1 criteria?
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

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