Calculate The Average Of A Group Cells In One Column Based On The Condition Of Another Column

Oct 2, 2008

I'm trying to figure out if there is a formula I could use that will calculate the average of a group cells in one column based on the condition of another column. It's hard to explain, so I will show an example. All the data is on a one worksheet and I'm trying to show totals and averages on another worksheet. Location, Days

17, 4
17, 3
17, 5
26, 4
26, 8
26, 10
26, 7

On a different worksheet I would want to know what the average days are for each location. So is there a formula that I could use that will look at column A for a specified location number and then average all the days in column B for that location? I'm using Excel 2003 and have tried using the Average(if) but with no success.

View 2 Replies


ADVERTISEMENT

Calculate Average For Column Based On Moving Start Column?

May 3, 2013

I have a pivot that includes customer data and I need to create an average for each row based on the first populated column for each customer. After one month of units appears for the customer, I need to calculate the average going forward, and if there are blanks after that they should be treated as 0 in the average. Below is an example of my description of the pivot.

Jan Feb Mar Apr
Customer #1 1 1 3
Customer #2 1 3
Customer #3 2 2

So, the average for customer #1 would be calculated from Column B to Column E, and factor column D as a 0 in that calculation. Customer 2's average would start in Column C and go to Column E, and factor column E as a 0 in that calculation. Customer 3's average would start in column D to column E.

View 5 Replies View Related

Formula To Calculate Average Values In Column B Where Value In Column A

Mar 11, 2013

I'm currently using this formula to calculate the average values in column B where the value in column A ='s E1 eg:

=AVERAGEIF($A$2:$A$21,E1,B2:B21)

Instead of doing this however, I need the formula to calulate the average from column B where the "Date" in column A ='s the year and month I specify in other cells.

Year value specified in: F1
Month value specified in: G1

View 9 Replies View Related

Average Of Each Group In 2 Column Range

Nov 21, 2007

I just want to say If Column B = "Team A" then add up Column A (where the individual's percentage score is) and then divide by the number of matches found (this last part is the main part I'm struggling with). I've got a column that has the team name for each row as well, what's the formula word for doing this, I though vlookup, but I may be barking up the wrong tree.

View 3 Replies View Related

Copy Multiple Cells Based On Condition In Column

Feb 13, 2008

I need the macro that looks in to say Column H sheet1, if value ="true" then copy cells in column A, B, D, F to Sheet2.

View 2 Replies View Related

Average Cells Based On Dulplicates In Other Column

Nov 27, 2006

I was wondering if there is a way for excel to compare cells and identify when they are identical. My objective for this is as follows. Lets say i have some data entered in cells A1:A10. Suppose cells A1,A3,and A4 had the same value (112-343). Now suppose cells B1:B10 had values also, lets say B1=2, B3= 2.5 and B4=8. I need for excel to go through the A1:A10 range and realize when the A cells have identical values, after this is realized i want excel to take the values in the B cell that correspond to the identical A cells, average them and then store them in cell C. And if there are mutliple identical cells i would like the routine to be able to identify this also. lets say A1=A3=A4=(112-343) and A6=A8=A9=(154-456) ....

View 7 Replies View Related

Condition Paste Formula In Column N Based On Column A

Sep 7, 2009

I am wanting to paste formula from N1 till N X (X = varaiable row) where X reliant on Column A Row X. If Column A Row X has character "=====" it should paste N1 Formula all the way down till N Row X which is equal to A Row X containing "=====" .

I might be sounding complicated over here but it is a simple equation.. I have tried to approach this in the capacity i could by condition if Column A row x is blank delete the row.

View 2 Replies View Related

Nested If Statement - Calculate Value Based On All Of Active Cells In Column

Sep 11, 2013

I am putting together a procedure to calculate a value based on all of the active cells in column "A" and a couple other conditions. "k" is my variable to put a value into (k,8) until all the active cells in column A have a corresponding value in (k,8)

I have my scenarios all built out into If statements and the code runs....but no value is being added to cell (k,8) for any of the rows with entries in column "A" when the procedure is finished running. Depending on the values in (k,2) and (k,3) there are four different ways the value in (k,8) needs to calculate as I have built out below. Why my values aren't being added to (k,8)?

Code:
Sub CalcSpecialFee()
Dim k As Integer
Dim cell As Range
k = 4
Application.ScreenUpdating = False
Sheets("Summary").Select

[Code] .........

View 1 Replies View Related

Average From One Column Based Upon Criteria From An Adjacent Column

Jan 13, 2008

I am trying to get an average from one column based upon criteria from an adjacent column. The number of days to close a case for race columns Black and White are listed in B5:C16 and E5:F16 and H5:I16. I need a formula to calculate the average days taken to close cases for Males and then the same for Females. Sample below: ...

View 12 Replies View Related

Using DATEDIF To Calculate Average Age Of Column

Jan 5, 2014

I have a DATEDIF column which I have used to calculate the age of a group of people from their dates of birth. This has produced results in cells which look like this: Age is 44 years, 1 Months and 28 Days

Where I am stuck is that I need to calculate the average of this column so I get the average of the total group. Is this possible?

View 9 Replies View Related

Calculate Average Of 4 Lowest Numbers Out Of Last 7 Entries In Column

Jun 4, 2014

Daily Result
14
10
16
10
5
15
8
12
15
9

I have the formula working for the average of the 4 lowest of all, using "AVERAGE" and "SMALL"; need for average of 4 lowest in most recent 7

View 6 Replies View Related

Calculate Average If Condition Met

Apr 3, 2008

I have two columns of data. Column B is age column C is gender. I want to calculate average male age and average female age. Suggestions?

Sample
B C
57 f
53 f
47 m
40 f
42 m

Average female age is ___
Average male age is ___

View 9 Replies View Related

Average Column Of Cells But Ignore Errors And Return Average Of Numbers That Are There

Jun 14, 2013

E11 through E24 contains numbers and a few errors (#N/A) that need to persist (the errors need to show).

E10 needs to show the average of the numbers that are in E11 through E24, and just ignore the errors.

I have many columns like that - where the errors need to show and I need to show an average of the number/values that do appear, ignoring the errors.

View 14 Replies View Related

Excel Average Dates - Calculate Percentage For Each Column Individually

Feb 11, 2014

I have an excel spread sheet with columns of dates I am trying to get an average formula that counts dates less than a year old as 1 and blank cells and dates greater than a year old as 0 and then gives me a percentage. For example I have a column with 10 dates all less than 1 year old I would get 100% but if I had a column with 8 dates less than a year old and 1 dates older than a year, and 1 blank cell, I would get 80%

Is this possible at all, or do I have to calculate the percentage for each column individually.

View 9 Replies View Related

Group Scores Based On Value In First Column

Apr 25, 2013

I am trying to analyse a set of scores of different doubles tennis tournaments - new tournaments and new players are continuously being added and so need some dynamic way to analyse. I would like to extract sort of a ranking system based on the scores by each player and one way to do so is to analyse the scores by tournament. Basically the same players play in different tournaments and i want to be able to know who performs better than others i.e. get better total scores during a tournament.

The attached gives an example of the data i have as well as the result i would like to achieve. It does not really matter if a formula system or a pivot solution is provided as long as i achieve the result, and can add to it as new data is populated. I have been trying all sort of solutions using pivots, matches, lookups etc but no luck yet.

View 7 Replies View Related

Subtotal Each Group Based On Changes In 1st Column

Oct 28, 2009

Need to insert 2 blank rows and sum columns (Columns B & D; range varies) based on cell value change (Column A). In attachedment I have before and after examples.

View 6 Replies View Related

Average One Column Based On Another Column

Dec 14, 2006

I am trying to calculate averages for a ratio I have calculated. Is there a way I can use VBA or Excel functions to average the G column depending on the value of the D column? In other words, find the average value of column G for all Industry Group = 103. Then, find the average value of column G for all Industry Group = 106. Then put industry group # in column H and avg. value in column I.

View 2 Replies View Related

Copy And Paste Unique Values From Column And Use Countif Function To Calculate Average

Jan 19, 2013

I'm stuck on the final piece of my macro project. I've attached a workbook with two sheets: sheet 1 is what I currently have, and sheet 2 is what I'd like my report to look like when complete.

On Sheet 1:
- column B is called Supervisor Name
- Columns D-O are months of the year, with either a Yes or No in each cell.

I'd like to write a macro that will:
- Take all unique values in Supervisor Name column, and paste these Above the current table.
- For each Supervisor, and each month, I'd like it to calculate, as a %, the number of Yes mentions in each month divided by the total cells (Yes/(Yes+No)).

Sheet 2 contains the output, in the format I'd like to see it.

Sheet 2:
Supervisor Name
October
November
December

Supervisor 1
8.3%

[Code] .......

View 7 Replies View Related

VBA To Get Average Of Range Of Cells Based On Named Range In Different Column

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

Highlight Cell In Column A If Certain Group Of Cells Contains Certain Value?

May 1, 2014

how to highlight C2 IF any cell in C4:C20 contain a certain value. if so, what is the formula for the rule?

View 1 Replies View Related

Calculate Average For Values In Range Of Data That Fulfill Certain Condition

May 20, 2014

I am trying to calculate average for values in a range of data that fulfill a certain condition viz. >1000 &

View 5 Replies View Related

Group Range Of Cells According To Months Written In One Column

May 15, 2014

Sample workbook for Excel forum.xlsx

I have multiple lists like company A company B so on and on. each has multiple accounts maturing at different dates.how can I group accounts maturing in one particular month? the maturing dates are different in some accounts and same in others.

company A
account no maturity date
account no maturity date
company B
account no maturity date
account no maturity date
so company C, company D etc..

All are on different sheets, I tried to figure out with Vlook up, and filter, but could not make formula.

View 7 Replies View Related

Protecting Cells Disables Group Column Function?

Jul 15, 2014

I have certain cells in my spreadsheet that contain formulas linking them with other sheets within my workbook. I have grouped sets of rows in my first 2 sheets (to show just headings and to expand to subheadings & details). When I try protect the cells with formulas on the sheet then it blocks me from expanding or contracting the row groups.

Is there an easier way to stop someone editing or deleting the data in my cells? There are about 2 dozen cells with formulas in my first sheet that need protecting - unfortunately not in any particular order...

View 8 Replies View Related

Count Empty Column Cells For Each Group Of Values

Jun 11, 2009

see attached workbook.

I'm attempting to count the empty cells in column C which correspond with the project reference shown in column A. I only want to perform this calculation where the project numbers change (see desired results in column D).

Am struggling with finding a way to define the different range of rows for each project ref within the formula. The full sheet has over 6000 rows and 1500 project refs.

View 4 Replies View Related

Change Color Of Group Of Cells Based On Data In Another Group Of Cells

Jan 12, 2014

Conditional formatting. I want to change the color of a group of cells based on data in another group of cells. Example:

If cells G8 and G9 (which are merged) are between 80% and 94%, then I9,I10,I11 (which are merged) will turn Yellow. Also, under the same scenario, IF G8 and G9 is greater than 94%, then cells I9, I10, I11 will turn Red.

View 2 Replies View Related

Concatenate Column Based On Condition?

Aug 13, 2013

I need a formula to be placed in cell Col A, Row 1, that concatenates any and all cells in Col A, with a ';' separating each item. I only want this concatenation performed ONLY IF an adjacent cell in Col B contains the letter 'X.

Additionally, if the cell in Col A is null, then I the formula to ignore it, and not perform the concatenation.

Is there a way to do this formulaically?

View 1 Replies View Related

Sum Values In Column Based On Condition In Another

Oct 7, 2007

II want to sum the values under 'amount' column only if the corresponding value under 'Balance' column is "Paid"

NameAmount Start Date End Date No.of DaysInteresetBalance
Sat1 250 1-Aug-07 20-Aug-07 19 - "paid"
Sat2 550 4-Aug-07 20-Aug-07 16 -
Sat3 250 10-Aug-07 20-Aug-07 10 - "paid"
Sat4 450 6-Aug-07 20-Aug-07 14 -

Total PAIDAMOUNT(B1:B4)

For the above, the sum value should be 500. I have written the following function to calculate the same. On uncommenting the line 'paid = CStr(paidvar)' the value is displayed as '#VALUE!'. On uncommenting all commented lines, the value is displayed as 'Paid'.

Function PAIDAMOUNT(amountRange As Range) As Variant
Dim count As Long
Dim paidvar As Variant
Dim paid As String
Application.Volatile True
PAIDAMOUNT = 0
For count = 1 To amountRange.Cells.count
paidvar = amountRange.Offset(count - 1, 7 - amountRange.Column).Value
'paid = CStr(paidvar).................

View 2 Replies View Related

Conditionally Format Each Group Of Rows And Each Column And Color The Cell In Each Column

Nov 27, 2009

I've a worksheet that is 3750 rows of cells from A to DT and contains only numbers with the exception of a header row. The rows are in groups, primarily 4 rows, although there are exceptions - these rows are separated by blank rows. Small example as follows.

0:001:002:003:004:005:006:007:008:009:000000-296567-6-1-400000286567-300-230000715557-16-11-40-18141755226-348405-362203081417192125-893581061800-2443-11124-289326-81318-1105027854331331211318-10216-161235526785691450451115951-17-1882505656683093102671056-191-33-2710000554740971-61-78-34224107-169-128-17090179-85220-55-63-1-162-140-242-235328266319106113-214-64-148205-4108120-142076-167-60-68-6418081102-800000000000-3099695807185-80356138-123194186210677727125-23233092-2942944748055564476-422051-224-34461486649597117-84209-22-251-94

I have been trying to conditionally format each group of rows and each column and color the cell in each column of four (or less) numbers in each group that represents the maximum number.
It was easy enough to come up with the conditional formatting BUT it will take forever to do this manually. I've been told to use a macro but I know nothing of programming. Has anyone seen or heard of a macro that might already be written to perform this onerous task.

View 9 Replies View Related

Copy Cell Value To Different Column Same Row Based On Condition?

Oct 13, 2012

I've schedule header date 1-oct,2-oct,3-oct.....etc and have two cells Last Date and Hours I need from those cells once i add date and hours to copy the hours and paste in schedule header in the exact date..

for example
#
Last date
Last Hours

[Code]....

but was too slow takes long time.

2nd VBA code to copy last hours to schedule date based on condition on last date cell.

View 3 Replies View Related

Populate One Column Based On Condition Of Two Other Columns

Jan 17, 2014

15.png
Attached is the file & snap shot for the problem.

TABLE A
[table="width: 500, class: grid"]
[tr]
[td]Catagories state names devices
A4-100HP A ALT

[Code] .....

TABLE B
Catagoriesstate names devices
A4-100HP
A4-101MP
A4-102AP

[Code] ....

In above condition we want to have an automatic filling up of data in table B in column (name & device) but it should match first with state name with category codes of table B & then same with table A in order to avoid any wrong entry because in table A certain states are repeated but codes are unique so we want that filter should match two column of each table before filling data in table B.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved