# Utilize AVERAGEIF Function For Specific Range Of Values?

Feb 12, 2014
Is it possible to utilize the AVERAGEIF function for a specific range of values. For Example, instead of ">45", I would be looking to only average the cells that have values between 40 & 60. I've tried several different ways to input that into the function but nothing seems to work.

View 3 Replies
ADVERTISEMENT
Dec 5, 2013

I am trying to use the AVERAGEIF function to give calculate averages based on dynamic data. The formula I want to work is:

[Code].....

but this returns the "#DIV/0!" error.

However,

[Code] ....

returns the correct value.

I want to be able to calculate averages of only the cells that are greater than the value of cell D6. Is there a way to do this?

View 3 Replies
View Related
Sep 15, 2009

I'm trying to use the average if function to average a range of numbers, only if a different range of numbers numbers equal a number in two different cells.

ex. average A1:F1 if G1:L1 equals M1 or M2

View 3 Replies
View Related
Mar 25, 2009

I was just recently forced to create my first UDF and after how well it worked I now am very interested in learning more. I am trying to create a function to sort a range by the values in a specific column and return the range. I know this should be really simple but for some reason my code dies whenever it gets to my inner-most loop. I need to use this in a larger function but for now this is my only question. I did find that Excel 2007 has built in Functions for this but my company still uses 2003.

My

Public Function SortRange(rngToSort As Range, valCol As Integer)

Dim Swapper As Variant

Dim i As Integer, _

j As Integer, _

k As Integer

For i = 1 To rngToSort.Rows.Count

For j = 1 To rngToSort.Rows.Count - i

If rngToSort(j + 1, valCol) < rngToSort(j, valCol) Then

For k = 1 To rngToSort.Columns.Count

Swapper = rngToSort(j, k)

rngToSort(j, k) = rngToSort(j + 1, k)

rngToSort(j + 1, k) = Swapper

Next k

End If

Next j

Next i

SortRange = rngToSort

End Function

View 9 Replies
View Related
Jun 5, 2014

I am trying to use the AVERAGEIF function on the below screenshot. I have a mix of text cells (ignored by default), 0s, and whole numbers from 25-100. For some reason, the value in Q16 is incorrectly averaged. The interesting thing is, I have similar data and function in R16 and it is working as expected.

Q16 =AVERAGEIF(B16:B16:D16:D16:F16:F16:H16:H16:J16:J16:L16:L16:N16:N16,">0") --> expected value of 275/3 (decimal rounding 0 places) is 92[code]....

View 12 Replies
View Related
Sep 24, 2009

I need something like AverageIf function that basically takes the B column and averages only the numbers that are not 0… I have messed around with this and finally just got frustrated, maybe its because I’m using Excel 2003?

View 10 Replies
View Related
Nov 6, 2008

I have data that i need to average. In Excel 2007 there seems to be a function to do this but it isnt available in 2003 version.

In column A there is a load number in column B there is a total load time, i need to be able to calculate an average load time.

View 12 Replies
View Related
Sep 11, 2013

In cells G2 to G57 I have the months from Jan-09 to Aug-13. In H3 to H57 I have the monthly data. In cell k2 I am trying to average all of the December data without individually clicking each cell (Ex: Dec-09, Dec-10, Dec-11, Dec-12). I was thinking of doing Averageif formula like =AVERAGEIF(G2:G57,"Dec*",H2:H57) but I get the dreaded #DIV error.

View 1 Replies
View Related
Mar 11, 2014

I'm looking to average the numbers contained within 5 different columns if the corresponding cell in a different column is blank.

Here's what I have currently (with column A being the conditional cells and D:H being what I'm looking to average)

=AVERAGEIF(A3:A26, "", D3:H26)

From what I understand, this function only allows me to average a single column. If this is in fact a limitation of excel and not just of my knowledge, is there a different way to calculate the average of D3:H26 when the corresponding cell in column A is blank?

View 11 Replies
View Related
Jan 2, 2009

I cant figure out an averageif formula for a particular criteria. my criteria is any number between 10000 and 20000. Here is an example.

=AVERAGEIF(C:C,"between 10000 and 20000",G:G)

DateMachineLocationEventAmountStaffTimeComments1416041416042141604612326123211612321120410

1120512112035

View 9 Replies
View Related
Jun 3, 2009

Hi, I'm very new to writing Excel Macro's and wanted to know if I could do the following. Conceptually, I understand what I need done and think it should be fairly straightforward.

There's 2 main events in this loop (I hope that's the correct terminology):

Input 1) User defines the beginning cell to start the loop. In this case, A2.

Input 2) User defines the range of columns/rows to display. The formula for rows that I've thought of is 4r. So if a user wants 20 rows below cells A2, they simply input 5 for r. The number of columns is a constant 5. So if r=5, then I'd want the range to be A2:E22......

View 13 Replies
View Related
Dec 15, 2006

I'm looking for a function (or combination of functions) that will essentially search for a row that contains two specific values (in two different cells), then grabs a value from another cell in the same row to use in a calculation.

I don't know... that probably doesn't make any sense, and maybe there's no way to get it done. If so, it would save me hours. Couldn't see a way to attch an example file to my post, otherwise I could probably describe it a bit clearer.

View 4 Replies
View Related
May 13, 2014

The spreadsheet has over 200K rows and two dozen columns. My job is to:

1. There are two columns, one is called OCR code where we have repeating ID's and other column is called Minutes Count which is basically a number. I have to filter the OCR column for similar OCR codes(values) and then add their time(Minute Count) so that I get total minutes for a specific OCR code. After adding the min I will copy them into a new sheet with the code in one column, total minutes in another and number of repeatitions for that specific OCR code or count number in a separate column. Example:

OCR_Code; Minutes

54xg; 456

45fk; 65

23IS; 18

54xg; 971

45fk; 265

.

.

.

Now I've to filter 54xg so that I can only see it and its corresponding minutes. Then I will add up all min for 54xg. Then I will count the number of instances a 54xg has been repeated in spreadsheet(here its 2 but it can be in hundreds in my case). Last thing is to transfer all this data to a new sheet. And automatically repeat the process for other OCR codes like 45fk, 23IS etc...

View 3 Replies
View Related
Jan 31, 2009

I am tracking total man hours of contractors in columns of different rates applicable. At present I have structured my worksheet with the different rates across and days going down. As I am invoiced for a period of work I will log the invoice ref number in a separate field. I would like to sum totals to report against $ Invoiced and $ Committed (i,e worked but not actually invoiced against yet).

Here is an example of what I am trying to achieve. The Actual showing sum mhrs * rate only for the mhrs entries with an invoice in corresponding Invoice Ref Column. The Committed producing sum of all mhrs * rate [which I am using =(SUM(D9:D37)*D7)] regardless of what is in invoice ref column.

This way I can hopefully track what we have been billed and also what we can expect to have to budget for to cover what has been worked but not billed against.

View 9 Replies
View Related
Sep 30, 2009

I have a table of dates and values and would very much like to know a formula for returning the min and mean values for each column within a specified time (date) period.

Table is as follows

Date value(a) Value (b) ....

1/1/09 10 8

2/1/09 8 6

3/1/09 5 2

View 4 Replies
View Related
Jul 16, 2014

I need to sum a specific range of values between two headers in several dynamic sheets. The values in the sheets always starts in row 10 and column H (Forcast). For example the header could be "Sales" in column A. Then I want to sum values above the header "Sales" in forcast column H. The next header could be "Operations", where I want to sum the values between "Sales" and "Operations" in column H. Next header could be "Rents" then I want to sum the values between "Operations" and "Rents" in column H, and this is how it continues... Is there any macros for this?

View 2 Replies
View Related
Oct 24, 2007

I need to keep track of tardy occurences, but I only have to consider occurrences that have occurred in the past six months from the current day. Column A contains the names of the employees, Column C thru IV contains daily dates beginning with 1/1/2007. Column B contains a CountIf function to count the number of times T appears in columns c - iv.

View 9 Replies
View Related
Oct 6, 2007

I have a working spreadsheet that utilizes many many formulas in many worksheets. I am utilizing the sumproduct function in many of the formulas. The problem is that it takes forever to run and update this report. I think I can utilize a pivot table except I have one small issue.

I would like to create a Macro that would run through my Details worksheet (contains all of my raw data) and seeks out certain criterias and issues a 2.5 or 3.5 result into a new column. Column C contains Make names. Column B contains Model numnber. I would like the 2.5/3.5 result to be recorded in column Y.

Make/Model

Fujitsu - Any model number that starts with MH

Seagate - Any model number that starts with ST9

IBM - Any model number that starts with IC2

IBM - Any model number that starts with HT

Hitachi - Any model number that starts with DK2

Hitachi - Any model number that starts with HT

Hitachi - Any model number that starts with IC2

Western Digital - Any model number that Ends with UE

Western Digital - Any model number that Ends with VE

Western Digital - Any model number that Ends with BEAS

Western Digital - Any model number that Ends with BEVS

If any the the above Make/Model criterias match I would like 2.5 to be recorded in the Y column for the row. If the Make/Model criterias do not match I would like 3.5 to be recorded in the Y column for that row.

View 9 Replies
View Related
Mar 5, 2009

Column A includes a name

Column B includes an age

Column C states a division (this is the column that contains the Vlookup function)

Column G is where I have to put a range of ages (for instance, x=<0,>3)

Column H is where the division name is.

The idea behind this exercise is to use the Vlookup function in column C to reference column G, and return a value in column H. Here a copy of my formula in column C: =VLOOKUP(B3,$G$3:$H$12,2,TRUE). For instance, if Mike (A) is 16 (B) then he would be in the Midget division (C). C is calculated by comparing column B to G, then returning a value in column H. For some odd reason, I can't get column G to reference an age range, such as 1-5 years old.

View 2 Replies
View Related
Jan 14, 2009

I am trying to write a function that sums the values in a range in excess of 2. For example, if the cell is 3 add 1, if it is 5 add 3 etc.

Here is what i have so far, it compiles with no bugs, but it does not work in my worksheet. I wrote it in Sheet 1 (VBA) of the worksheet i am using it in.

View 2 Replies
View Related
Dec 27, 2012

I've been heavily updating my Budget file I've written in excel. The code I'm working with and having slight trouble with is as follows

Try this formula. Column letter & Row number are for example only. Array formulas will have curly brackets {} emcompassing the ENTIRE formula. You do not add these, you Enter the formula with Ctrl+Shift+Enter and Excel will add them (details: Array formulas). Many more Excel Formulas

Â Z100Â =IF(TODAY()>DATE(2013,1,31),"January's Ending Balance is:",IF(TODAY()<=DATE(2013,1,31),"January's Current Balance is:"))Â

Basically, if the current date is after the last day of a given month (in this case January 31), then the cell should display "January's Ending Balance is:", if between January 1, (current year), and January 31, (current year), it should display "January's Current Balance is:". The code above does work great, but I need it to look at the current year according to the computer's date, and go by that, instead of having to change the code where it says 2013 to 2014 etc every year. This would be a hassle, as I have a tab coded for each month of the year. Id rather it be automated.

View 8 Replies
View Related
Jan 29, 2013

I would like to remove spaces and utilize the alt+enter command - - I am more worried about removing the spaces than anything else at the moment.

Example:

D-1173-G-00002 D-1173-G-00065

D-1173-G-00002 D-1173-G-00065

D-1173-G-00045 D-1173-G-00064

Note: The spacing between these are not common throughout my entire column.

What I am looking for:

Example:

D-1173-G-00002

D-1173-G-00065

Example:

D-1173-G-00045

D-1173-G-00064

View 4 Replies
View Related
Jan 17, 2014

I am trying to use the INDIRECT function to look up values on a range of other worksheets. I have a column of data in col A which is essentially a lot of different worksheet names. On each worksheet I need to use VLOOKUP to find a value.

Easier to show formulas. This is an example of what I want to recreate:

=VLOOKUP(O2, test!B3:C13,2,FALSE)

I want to replace the text "test" with the text in column A. So the first INDIRECT formula looks like this:

=INDIRECT("VLOOKUP(O2, " &A1& "!B3:C13,2,FALSE)")

Which to me looks like it should work but I get a #REF! error. I've tried various permutations, e.g. having the INDIRECT part of the formula located in a different place (next to the "test" text) but run in to similar issues.

View 5 Replies
View Related
Jun 23, 2014

I have multiple spreadsheets that have formulas pulling from other spreadsheets that I use for daily, monthly & annual reports. After upgrading to Windows 7 from Windows XP these spreadsheets are no longer seeing the formulas if I open multiple spreadsheets at a time. This is a problem as my monthly and annual spreadsheets need to pull from multiple workbooks in order to give me monthly and annual totals. I have macros set at "Enable all macros" and have added the file location in "Trusted Locations". What else do I need to set in order to work on multiple spreadsheets at a time and the formulas pull data as needed?

View 1 Replies
View Related
Apr 7, 2009

I am having a bit of a problem creating a formula for this report that I have to update every week. I need to be able to find the room nights and net room revenue values for the specific rate code in the "MATRIX" workbook.

On "CURRENT REPORT," I need D4 to pull up the value on "MATRIX" that equals "Room Nights" in column H and "CONABC" in column J. The same thing needs to happen for F4 but with "Net Room Revenue" in column H. The full report has about 500 of these codes in column J, and I need a formula that I can copy easily and will not be affected if codes are added or removed. This is super last minute - I need to finish this report by tomorrow morning, so take a look at the attachments.

View 2 Replies
View Related
Jul 8, 2009

I am trying to calculate time in the ER, avg. time in the ER, and time before seen in minutes USING the Averageif function. However, in the columns that I am trying to calculate, there are a lot of ######### and 0:00. So I thought that if I use =AVERAGEIF(AL2:AL47,">0") then that would exclude the ######## and the 0:00.

However, it seems that the formulas are not working. For example, one column contains 00:10, 00:04, 00:05, then a lot of ########, and 0:00.

When I take the =AVERAGEIF(AL2:AL47,">0") of this whole colum then it gives me and average of 18:02!!!!

18 hours and 2 minutes can not be correct!

View 11 Replies
View Related
Feb 1, 2010

I'm working on a project for my company. We make plastic tanks and for quality control we want to start recording the thickness of the tanks in different areas/zones of each tank.

Attached to this message is an Excel sheet that I've been working on. From "Sheet 1", it records inputted thicknesses into WorkSheet "1098". On the top of "1098", it shows all of the recordings, and just below that are the "10 Most Recent Entries".

Right below the "10 Most Recent Entries", there are formulas to calculate the Min and Max Values. Whenever a new entry is recorded, the selected cells for the Min and Max formulas change. Is there a way to force the cells to always stay the same?

View 3 Replies
View Related
Feb 3, 2010

I am using the following formula, but for the cells that dont have data I get the #DIV/0! error.

=AVERAGEIF($B$6:$B$48,B59,$W$6:$W$48)

View 2 Replies
View Related
Oct 27, 2009

I currently have this equation: =AVERAGEIF($B$2:$B$900000,">="&L5,$C$2:$C$900000). Where L5 = 100. I'm interested in having the formula averageif B column value is between L5 & L6. Where L6 = 200. So I want it to find all values in B$ that are between >= 100 but < 200, and then average their C$ counterparts.

View 3 Replies
View Related
Dec 17, 2008

I've got a spreadsheet I use to track quality scores, it will appear like such, and with 2003 I don't have AVERAGEIF()

name | team | score

joe f | billing | 3

may r | billing | 3

roy m | status | 1

kay t | first call | 1

etc...

I already used an array function to find the average of each team (even with empty scores) by using:

=AVERAGE(IF(DeptRange=$B$7,C$20:C$200)) [Ctrl-Shift-Enter]

EDIT: Incidentally, I changed AVERAGE() to COUNT(), and it kicked back 9 values instead of 3 (I have one value entered for each team atm). B7 is the name of the department I'm finding the average for. I've got 3 departments in one location, and 6 in another location. I'm trying to add OR() to give me our regional quality averages, and it's not working. I used:

=AVERAGE(IF(OR(DeptRange=$B$7,DeptRange=$B$9,DeptRange=$B11),C$20:C$200)) [Ctrl-Shift-Enter]

View 2 Replies
View Related