Finding Average Of A Range With Macro
Jun 1, 2009
I'm working on a project in which i had to calculate the average of particular field and that also with a macro in this application i had done that that's working supperb but i'm coming accross a problem according to which the range which i had to take average dosen't contains all integers
eg if range is A1:A10
then data is like
79
80
98
TBA
98
TBA
TBA
N/A
N/A
N/A
now ave for this range can't be calculated directly as many values are strings
what i need is
using a avg function on this range where TBA(To Be Anounced) is to be treated as 0 and N/A(Not Applicable) as null value
here's da avg dunction which i had used in macro
View 6 Replies
ADVERTISEMENT
Apr 16, 2007
In column A I have a list of 5 Auditors labelled Q1 - Q5, 5 Coolum’s across in column F I enter in their scores as a % e.g. 80%. ...So Q1 - 50%, Q2 - 60%. In column A37-A41 I have Q1-Q5 listed, in Column B37-B41 I need to calculate the average deviation per Auditor eg. If Q1 has 2 entries of 50% and 75% return average value in cell A37 which should be 62.50%. I am trying to calculate the average for each Auditor. find attached example.
View 2 Replies
View Related
Nov 6, 2011
Is there a macro that get the average of the best 3 out of 5 in a range of numbers....if the range doesn't have 5 then adjust with what it has.
ex..
a....65 66 54 33 72
b....57 57 42 70
c....55 45 22 65 80
d....78 34
e....66 66 54 23 56
f....55 66 77
View 8 Replies
View Related
Sep 30, 2006
I have to make VBA codes to get the average of two ranges. The problem is I always get 0 value. The value of each cells came from the formula that's why I use .TEXT. Here is the code.
iAveragePrep = WorksheetFunction.Average(Range(Cells(275, 4).Text), Cells(275, 5).Text)
View 8 Replies
View Related
Aug 1, 2013
I need to find average of the values , the count of the cells will be dynamic (may be 5 or even 200).
View 2 Replies
View Related
Mar 24, 2007
Sub maxTemperature()
Sheet6.Select
Dim myrange As Range
Range("b1").Select
myrange = ActiveCell. CurrentRegion
cellcount = myrange.Count
imax = ActiveCell.Value
i = 2
Do
Do While i < cellcount
If Cells(i, 2) > imax Then imax = Cells = Cells(i, 2).Value
i = i + 1
Loop
Range("a25").Value = imax
isum = 0
For i = 1 To cellcount
isum = isum + Cells(i, 2)
Next cellcount
ave = isum / cellcount
Range("a26").Value = ave
End Sub
View 8 Replies
View Related
Mar 10, 2009
I have 2 rows of data
1. title
2. value
eg
Row 1: Title1, Title2, Title1, Title4, Title2, Title1
Row 2: 2 , 3 , 0 , 1 , 2 , 6
In the above I am looking for the average of Title1, where the value is greater than 0. There are 3 occurances of Title1, but only 2 have values. The answer i am after is Sum is 8, average is 4 (ie 8/2 and not 8/3)
View 3 Replies
View Related
Nov 20, 2009
I am using EXCEL 2003. I am to find Average using few conditions. I have explained the requirement in the sample workbook.
View 7 Replies
View Related
Jan 2, 2009
I’m using the following formula:
SUMPRODUCT(--(Issue="Yes"),--(Month=Aug),--(Building=$A$9))
To find the number of instances where there was an issue in a certain building during a certain month.
What I can’t figure out is how to find the Average number of such instances for the past 3 months, the last 6 months & the trailing twelve months. If I change the formula to:
SUMPRODUCT(--(Issue="Yes"),--(Month>April),--(Building=$A$9))
I get the correct sum for the months of May, June, July & Aug but I need an average number of instances per month for the last three, last 6 and TTM but not to include the current month.
View 9 Replies
View Related
Jul 30, 2014
I have a number of rankings, all from different spreadsheets that I wish to combine and average out.
Thus far I have pulled all the relevant worksheets into 1 spreadsheet. The issue I'm having is that each worksheet contains slightly different names.
So as an example, Sheet1 may have 4 columns: Bob Hope | 4 | SE | PM |
Sheet 2 may have 2 columns: | Bob Hope, PM, SE | 8 |
Sheet 3 may have 3 columns: | Bob Hope, SE | PM | 9 |
What I need to do is have a master sheet which just pulls through the name and then the average of the scores, i.e.: | Bob Hope | 7 |
I have approximately 400 people that I need to do this with.
View 3 Replies
View Related
Jul 9, 2008
I am trying to get an average of a couple numbers, but I have to enter both numbers in one cell.
I have to enter the numbers in a cell as a range (ex. "1000-3000"). I need to convey it as a range in the spreadsheet I am doing, but in a separate cell I need the average of the extremes (1000 & 3000). Is there a formula or anything that would let me get the average of those two numbers(2000) directly from that one cell? If needed, I could make the cell "1000,3000" instead. I just don't want to make two separate cells, one saying 1000 and the other saying 3000.
View 11 Replies
View Related
Oct 18, 2005
I'm trying to find the average for a person with scores in column 4 on 3 separate sheets. The following function returns #VALUE.. Because the person may be in a different row on each sheet, I'm thinking I need to use the VLOOKUP function.... Also, as an aside, the person may have a zero on one sheet that would affect the average score...
=AVERAGE(VLOOKUP(A4,Week03:Week01!A$4:G$30,4,0))
View 14 Replies
View Related
Feb 27, 2013
I have to find the average of a set of data with a lot of different criteria. I think an array formula would work wonderfully but I just cannot seem to get it.
My example: I have a large set of data that I must get multiple averages from that fall within differing sets of criteria. For my example we'll just say that I have to find the average of the number column that occurs on or after Jan-12 (January 2012) and is type "p1" or one that has no date and is type "p1" and to not average numbers that are equal to 0. So logically it would look like this: If date
View 2 Replies
View Related
Jul 20, 2013
Finding an average age from a list of dates. This is just a small sample:
7/9/2013
7/10/2013
7/10/2013
7/10/2013
7/11/2013
7/11/2013
7/14/2013
7/14/2013
7/19/2013
7/19/2013
I tried using =AVERAGE(DAY(A1:A10)) CTRL + SHIFT + ENTER, but that just doesn't seem correct.
View 9 Replies
View Related
Jul 26, 2012
I am trying to average PT ScoreS from multiple groups based off of different criteria. Please see below tables:
KEY:
MS = Class CO = Company PLT = Platoon SQD = Squad
A/1 = Alpha Company, 1st Platoon (Example of Company and Platoon PT Score Average)
A/1/2 = Alpha Comapny, 1st Platoon, 1st Squad (Example of Company, Platoon and Squad PT Score Average)
F14 is the average of all PT Scores
A
B
C
D
E
F
1
NAME
MS
CO
PLT
SQD
PT SCORE
[Code] ....
I need to find the equations of different groups of PT Scores. I want the averages/equations to go below the different groups.
A
B
C
D
E
F
G
H
I
J
K
1
MS 1
MS 2
A
A/1
A/2
A/1/1
A/1/2
A/1/3
A/2/1
A/2/2
A/2/3
[Code] .......
View 2 Replies
View Related
Mar 11, 2014
I am trying to calculate the average headcount for different categories (over a certain period of time, by product, by job type etc) and I want to do it using a formula instead of a pivot table.
I have this set of data with a detailed headcount for every month. And I can find out the total HC for different categories using sumif/sumifs but if want to find out the average for a certain period, I need to split that total to the number of months where I have a HC.
For example, if the HC per month would be:
May 2013 - 12
June 2013 - 10
July 2013 - none
August - 5
in a 4 months period I would have a total HC of 27 and the average would be 9 (27/3 - July shouldn't be counted). How can I get the average in a single formula?
Month
Type
L/H
Prod type
HC
[Code].....
View 9 Replies
View Related
Apr 24, 2014
I have 2 columns of data in Excel which I have brought a small section of it below. As can be seen the values in the left column have a large spike (difference of more than 10) at certain points (in this case at 34). I wan to find the average of the numbers in the right column but only till the point where the large spike happens (in this case the average of the first 5 numbers). I've tried AVERAGEIF but it's not what I want. I want this to repeat for the entire column and give me the averages of each of these groups.
10
32.4
11
38.6
12.5
23
[Code] .........
View 2 Replies
View Related
Aug 4, 2009
I have 5 years of data in 2 columns:
Col A. Col B.
8/2/2004 Value 1
to
7/31/2009 Value n
I have a table set up as follows
1 2 3 4 5 6 7 8 9 10 11 12
2004
2005
2006
2007
2008
2009
I was wondering how I could construct a conditional statement to pull the associated values with the given month and year in the table...
I tried the following to no avail... I'm just getting a zero value:
=AVERAGE(IF(MONTH(J6:J1255)=AC$35,IF(YEAR(J6:J1255)=$AB37,K6:K1255)))
View 9 Replies
View Related
Dec 24, 2012
I am currently using Excel 2003. I have a worksheet with two tabs.
First tab has a list of bank Names. Second list has Bank Names and balances.
I need to find out the the average from a Bank in the first tab, to the same bank on the second tab that reflects the balances.
View 6 Replies
View Related
Aug 25, 2014
Please find the attached MS Excel 2010 file <average set.xlsx>.
There is set of positive set & negative set of values available in the Column A. The values are plotted against Column A in Column B. Light green are positive sets and light yellow are negative sets.
Now I want to calculate the average for the positive set & negative set of values as shown in light majenta in the cells F4:F9. Also all majenta cells to be plotted by formula.
The Column H and Column I also same as like above , but here negative set of numbers starts first.
View 4 Replies
View Related
Jan 22, 2013
Excel 2007
ABCDE12145101843222121028543291410388563015104796731501058178325210
685894953107839104354108841011445510985111349661101215516710013135668
981417576999151858708916195971801720607291182161738219236274902024637
59121276476872228657786232425Sheet1
View 7 Replies
View Related
Apr 10, 2013
I am trying to calculate some averages. What I have is 3 columns of data in A, B, C, also the "tasks" in A are in named ranges ex: "Award Contract" is a named range - "Task_Award" and "Confirm Updates" is a named range - "Task_Updates". I've attached a sample excel sheet.
I'd like to be able to create a macro to evaluate column A, and for every row in range "Task_Award", give me the average of the corresponding cells in column C and put it in the same range of cells in column B , then, for every row in "Task_Confirm" then give me the average of the same range of cells in column C and place the result in the same range of cells in column B. This is my very first post so I hope I am doing this correctly. I have 77 of these task ranges to evaluate and it will take a long time to do it manually. I'm thinking of a loop function.
View 1 Replies
View Related
Aug 5, 2014
I have attached xl sheet for ref.
I have value in E2(5),F2(10)=G2(5[sub of F2-E2])
I need to find E2(5) value in B2:B21 and the same of F2 also
After finding that
(eg): E2 value 5 present in B6 cell and it should come to c6 cell same of F2 also
Now It should select C6 to C11 cells.(ref of B6 to B11,ie,5 to 10)
I tried in vba and formuals but i couldnt find solution.
View 6 Replies
View Related
Jul 25, 2012
Book1.xlsx
I have two sheets of data and two tables (1=finial 2=data comparison) I am trying to figure out some kind of formula or vba that can easily tell me that the location point in table one data comparison matches the location in table two. The VPMDFS (location footage) in table two or NDE data can be a range, say vpmdfs.NDE + or - 3 ft. so the ILI or source record should fall in between this range. Once the match has been made I need to copy and paste that record onto sheet one all in the same row. I have been scratching my head and researching for weeks and cannot come up with a simple solution. My problem with all the scenarios that I've tried is the formulas what the data in the data comparison sheet to already be in the same row. Please reference my attached work book for examples.
View 9 Replies
View Related
Apr 4, 2009
I want to be able to find all the 0 differences (i.e debit = credit) cut that group out of that sheet and paste it to a new sheet in the same workbook. I have the code to find the 0 difference but I don't know how to select the range that makes up that difference and cut and paste it to a new page.
View 2 Replies
View Related
Jun 16, 2009
I name a range "MyList".
In another cell, I use Data.Validation.List and use "MyList" as the source.
Now I find another range named "HisList". Is there some way to determine if "HisList" is being used as a source for some other validation somewhere in the workbook?
"Trace Dependents" doesn't work.
View 13 Replies
View Related
Sep 12, 2005
If i have a range, lets name it "Names" and i want to find if the name
George is in that range, what formula should I use?
View 9 Replies
View Related
Apr 9, 2014
The data I need is in the middle of the worksheet (A16:B41), is there way to define the range so that excel only looks at that range and finds the last row of data?
Code:
Worksheets(i).Activate
lastRow = ActiveSheet.Columns("A").Find("*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows, LookIn:=xlValues).row
Range("A16:B16" & lastRow).Select
Selection.Copy
Sheets("difference Check").Activate
[code]....
View 9 Replies
View Related
Jun 21, 2006
Is there a property to, given a certain range, return the name of the range?
I have used the name property and gotten a name in the form worksheet!address, but I am trying to return the name that I have given the range.
I was planning on using:
'returns the name if it exists, else returns ""
Function findName(myRange As Range) As String
Dim name As name
For Each name In ActiveWorkbook.names
If name = myRange.Address Then
findName = name.NameLocal
Exit Function
End If
Next
findName = ""
End Function
However, this code isn't working because when comparing name to myRange.Address, name includes the worksheet that the range is on, but myRange.Address doesn't.
Even if I get the above code to work, it will take quite a while because I have many names in my worksheet, and would be running the findNames function many times
View 6 Replies
View Related
Jun 26, 2014
I have two columns (one is mean and the other is max) and the third column, I have the corresponding letter. I have in total 5 rows with mins and maxes and corresponding letters. I want a function that when i put for example #3 on cell D9, then my cell E9 will spit out the corresponding letter.
See the attachment : find the corresponding letter.xlsx‎
View 6 Replies
View Related