Find Average With Very Specific Condition

Mar 14, 2014

Let's say I had the following data ...

47
50

50
50

44
50

46
50

Basically, I have 4 numbers, out of 50, as seen above...I want it so the last number (46 in this case) is special; what I mean by that is I want the following conditions to be met.

--If the special number is the lowest, just take the average of the four numbers, and divide it by 50
--If there is a (are) number(s) lower than the special number, then I want it to locate the smallest
---The smallest number should then be "replaced" by the special number (for calculations purposes only, not in the actual table)

So, in this case, since the special number (46) is not the lowest, excel would locate the lowest number (44), and calculate the average of 47, 50, 46, and 46 (the 44 was replaced by 46).

View 4 Replies


ADVERTISEMENT

Average Formula For A Specific Condition

Jul 30, 2009

I have been asked at work to get some averages of data from an excel sheet. I have attached a sample workbook of the data i will be using. On Sheet1 is the data that will be looked at and on sheet2 is a sample of the results i need to achieve. I can get the data on sheet2 easy if i knew that data was static but in my case the data is going to be dynamic, so i don't know how many records each person is going to have each time if that person shows up in the record set at all. This rules out on static ranges to gather averages.

So far what i came up with is i use a macro to copy all the "Names" column to sheet 2 and then filter that data so that each name is unique, sort like a "key" for looking up values. Now i need to get averages of "Total Hours" worked in sheet 1 and display it in sheet 2 for each "Name". I have a formula worked out and almost have it where i want it but cant seem to get the range of data i need to be looking at. I need to get the Average Of hours Worked Per Person Where "Wk End Date" is greater than 1/1/2008 and the "name" matches up with the name in sheet 2.

View 3 Replies View Related

Find Average Of The Specific Month

Oct 16, 2009

I have two columns: 1) Last Date of each month from 2005 and 2) Value.
Date format: dd.mm.yy

For example:
31.01.05 1.7
28.02.05 -0.7
31.03.05 2.6
30.04.05 0.4
....

How can I find the average of second column of january months only? I tried countif, sumif and many others, but cannot find the solution.

View 3 Replies View Related

X Condition Lookup: Find The Specific Value Within The Table Or Array

Aug 21, 2008

Given three criteria (category, name and date) I want to find the specific value within the table or array. refer to attachment.

View 4 Replies View Related

Find Specific Value In Array Which Appears Multiple Times And Average All Relative Cells

Jan 24, 2014

I'd like to search for a specific value like (1) in an array of cells like (A:A). The result needs to be the average number of a different column (B:B) in the same row as the searched value (1). And the resulting number should be rounded up to the nearest 10.

Example below: (Find value = 1 in A:A) ... 1 is found 4 times.

A | B
1 | 295
3 | 123
1 | 400
5 | 425
1 | 354
1 | 400

In the example above there are 4 (1's) found. By adding all the values in column (B) of the same row, we get 295+400+354+400 = 1449, dividing that in 4, the average is 362.25, rounding that up to the nearest 10... THE RESULT I'M LOOKING FOR IS: 370

View 6 Replies View Related

Macro Loop – Find Specific Times, Extract Date, Average Values Of Times

Feb 23, 2010

In my workbook I have about 20 sheets (less in the attached sample), and on most sheets I’d like to query data for each day and find an average value based on the time and then copy that result into another sheet. I’m not sure if I’ll need 2 macro’s for this or if one can be used.

Here’s a quick description:

Assuming that I am currently in the sheet I want to run the macro, then I will either input “1:45” or “0:45” into a popup box, or I could always simply input the 1:45 or 0:45 in the code itself. I’m flexible

1:45:

If I input 1:45, then I’d like the macro to find the first 1:45 in Column B and the value in the same row in Column F will be used in the calculation. Once 1:45 is located, then the macro moves up to find 22:45 in Column B and the value in the same row in Column F will be used in the calculation.....

View 11 Replies View Related

Average By Condition

Jan 10, 2008

I am trying to denote certain numbers with an asterisk (i.e. -10*) and then averaging a range of cells but excel thinks it's multiplication. Is there a way to ignore this? Range of numbers: 0 to -10. Tried left function but I need it to work no matter how many characters there are.

View 2 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 By Condition/Criteria

Oct 8, 2007

I am trying to create a macro using arrays to calculate average sales from a list of sale amounts that originate from different cities. Each city has its own city code and I want to display the average amount of sales for each city. The attached file is the template that ive created to do this. I am having trouble getting the arrays and loops to work. If anyone can help me out I would greatly appreciate it.CitySales2.xls

View 3 Replies View Related

IF Condition True THEN AVERAGE The Values

Jun 28, 2007

I'm looking for some help. I need a function that can check if each of two seperate values is less than one. If less than one then divide by 2. Then give me the average of these two values. So it could be that it takes 0.5/2=0.25 for one value and 3 for another to give me the average of 1.625.

View 9 Replies View Related

Calculating Average Based On A Condition

Jul 27, 2007

I need to calculate the average of values in a particular column if some other column contains a particular text. For e.g. I would like to calculate average age of all the people who belong to the Comapny "XYZ". Which means that I have two columns here one is "Age" and the other one is "Company". So For all the people who belong to the company "XYZ", I need to calculate average age.

Company Age

XYZ 24
ABC 26
ABC 34
XYZ 30

My average should be (30+24)/2 = 27.

View 3 Replies View Related

Average Of Cells By Condition / Criteria

Feb 7, 2008

I have an Excel file ( book) that I use for scheduling my restaurant employees. There are currently formulas in place that retrieve information from cells on one sheet to a cell on another sheet. For example:

If, on the first sheet I schedule Joe the following section on Tuesday AM (D14), his name will be automatically shown on another sheet which list the section/floor plan in quick view.

I need a formula (on a third page) that will allow me to tell me how many times an individual employee has had this particular section. The sections are listed with a letter preceding it. Such as D**, P**, B**, SB**, etc.

View 3 Replies View Related

Multi-Condition Volume Weighted Average Calculation

Sep 13, 2006

I am trying to figure a way -- preferably in a single- cell formula -- to calculate a conditional volume-weighted average of a series of associated prices and quantities located in two separate columns based on the date (or dates) the transactions occurred.

I can do a simple Vol. Weighted Average (VWA) of all the prices and quantities over the five-day period with the following formula: (I have created named ranges for the price column (A1:A30=price), the quantity column (B1:B30=quantity) and the date column (C1:C30=date):

= SUMPRODUCT(price, quantity)/SUM(quantity)...

View 9 Replies View Related

Find, Meet Condition, Sum Range, Deduce, Find Next

Sep 23, 2007

i have spent 40 hours, and still didn't find a solution. Please help is need it!!
example:
i have to find all articles with same code (222). first one has Q =100 second one Q=250.
soled Q=150
(i am talking about 5000 rows, 400 different or same articles per month- 12 months)


columnA-----columnB---columnC
222 ----------100---------0
111-----------50
333-----------70
222----------200---------200
333---------- and so on
first i have to deduct from the first one it finds (max. till 0 ...it can not be negative) ....after finding another one it deducts the rest---it means 50
Is there any kind of formula with this possibility.
if it is poorly writen please let me know for more info.
i am not an expert in excell, but i have tried variations of sumif, vlookup functions, but i always get stuck deducting the whole Quantity from all of the same (222) articles .

View 9 Replies View Related

AVERAGE IF Statement Based On Matching Condition And Date Ranges

Feb 22, 2009

I have created a spreadsheet which creates an average of feedback for trainers in a training company. The form adds up the feedback score into column L of the summary sheet and I have created a summary sheet which I want you use to calculate the average for each trainer.

I have cobbled together an array formula which creates the overallaverage for each trainer based on the named ranges entered via the form.

It looks something like this:

View 10 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

Add Condition - If Value Is In Between Get Specific Text

Feb 1, 2014

I try to add some conditions to get specific text. i.e.

if cell b4 <= 20% then cell f4=01.30min
if cell b4 >= 21% and <=50% then cell f4=02.00 hr
if cell b4 >= 51% and <=70% then cell f4=02.30min
if cell b4 >= 71% then cell f4=03.00 hr

I tried different ways, including select case but unsuccessful.

View 8 Replies View Related

Color Code -a Specific End Condition

May 12, 2007

I searched through the files and found a macro that works for me to color code my spreadsheets in Excle. Hwoever. How can I set it to stop when Cloumn G = the word "Created"?

Sub prettyPattern2()
Dim lRow As Range
For Each lRow In Range("A6:K500").Rows
Select Case lRow.Row Mod 2
Case Is = 1: lRow.Interior.ColorIndex = 34
Case Else: lRow.Interior.ColorIndex = 35
End Select
Next lRow
End Sub

View 8 Replies View Related

VBA Print Specific Pages Based On Condition

Jan 25, 2013

I'm looking to setup a macro that will print specific pages on the current worksheet. What pages will print in that same worksheet will be determined on the value of a specific cell.

Here is what I have that isn't working.

VB:
Sub Print_Specific_Pages()
'''''''''''''''''''''''''''''''''''''''''''''Prints only pages that contain data
''''''''''''''''''''''''''''''''''''''''''''
If Range("B3").Value = 0 Then
Worksheets.PrintOut from:=1, to:=1 'Prints page 1 when there is no data.

[Code] ......

View 5 Replies View Related

Working Out How Many People Reach Specific Condition

Dec 11, 2013

I've put together a spreadsheet look at the time taken for a vehicle to get from one building to another when called. I've set up conditional formats where the timings turn orange after 5 minutes and red after 10 minutes taken. What I also have to show though is who is taking the vehicle and break it down to show any delays to patients. Is there a formula that will automatically tell me when there has been a delay to patients?? Be amazing if there is as it would save me uber amounts of time as i have to collate a whole years worth of data!

I've attached a small sample of what I've done to show you how the spreadsheet looks.

sample.xlsx

View 5 Replies View Related

How To Copy Paste Specific Cells When Condition Met

Mar 13, 2014

I create a macro to copy cells for data starting from A4 to N4 from sheet - Register to 'Case History' when the cells in column N are 'Yes'. Also, would like to copy specific range from A-N and not the entire row. Please refer to the attachment.

Tracker Dept..xlsx

View 2 Replies View Related

Count Specific Criteria Based On Another Condition?

Jan 3, 2013

I'm trying to create a formula that tells me the following:

If the item is marked as closed (vs. active), then how many renewals/terminations replacements/etc are there? These are two difference columns in a worksheet.

View 2 Replies View Related

Average On A Specific Date

Jan 8, 2008

in the attached excel file, in cell D21, i have tried to join my SumIF/CountIF formula together with my 2 date range vlookups.

the first vlookup is for the start of november and the 2nd vlookup is for the end of november.

in essence, i want to the average price of all 6160 printers sold in November 07 period.

i cant get the formula working, so any help would be much appreciated by me.

View 7 Replies View Related

Average For Specific Dates Of Gap Time.

Mar 16, 2009

I would like to create an average function that will take an average of the Column labeled "Gap Time (Hours/Min/Sec)". I only want it to take the average for this for each new start date. These values will change daily so I was hoping that someone may help me write a function that will work when data changes instead of manually taking the average every time data is entered.

View 5 Replies View Related

How To Get Average Time For Four Specific Entries

Apr 7, 2013

I have a database of over 10,000 entries. I am trying to get the average time for four specific entries (department, test 1, test 2, test 3). I did an averageifs for the tests individually and calculated the average time individually.

The three tests comprise of the department.

Average of test 1 = 40.8
Average of test 2 = 39.9
Average of test 3 = 94.8

Average of dept using the averageifs is 41.3
Average of dept by taking the average of the values above is 58.8

Why is that discrepancy there?

View 6 Replies View Related

Average Of Specific Cells In Various Columns

Aug 3, 2013

I am trying to find the average of a cell with a name in that may appear several times in various columns. I then need to find the average of the value against that name in all the columns that it occurs in. Example:

a
b
c
d
e
f
g
h
i
j
k

Aldridge Sean
2
3
3
Andrew Rob
4
3
3
Aldridge Sean
3
2
2

[Code] .....

In the above example I want to find the average score for aldridge sean in column b, f and j.

View 9 Replies View Related

Average Data With Specific Criteria

Apr 6, 2007

I have a data base with 12 columns of data. I need it to look for one criteria in one row, match it, look for another criteria in another row, match that, and then once those criteria are met, average those rows that met the criteria with the statistics in that row that contains a value.

Such as:
Monica 2 Timed 310 Michele
Tom 3 UnTimed 410 TC
Art 5 Timed 216 TC
Monica 4 Timed 415 Michele
Tom 6 Timed 200 TC
Tom 4 Untimed 216 TC
Art 8 Timed 410 TC

What I need is the formula to search in through the data, look for Tom, then find all the ones that say UnTimed, and then average the number in column 2 that match those criteria.

View 9 Replies View Related

Detect Cell Conditional Formatting State Of Specific Condition

Nov 26, 2009

Is it possible to check the conditional state for a specific condition for a specific cell.
For example a cell has 1 or more conditions.

A condition will toggle to a condition if true or false etc.
The specifics is i use red (color 255) if a cell has not met a specific condition (of 1 or more conditions)
So if the cell is mandatory to be populated, and is blank, it will be red, if not it will be something else.

But i want to loop all visible cells with conditional formatting, and where the cell has a condition when true will show interior color = to 255 return the cell address.
To msg the user where data entry is still required etc.

View 6 Replies View Related

Color Table Rows Where Specific Cell In Row Matches Condition

Jul 2, 2008

I have a selection on a worksheet that has 4 consistent columns (A, B, C, and D) each with a variable number of rows all containing string type data. With this data I want to use Conditional Formatting so that when I have a string value of X in column D for any row, that whole row with the X in column D has it's color change to say grey, this should happen regardless of what strings are in Columns A, B, or C.

Below is the way I've been trying to do this thus far and failing, when I run this code below I can only get it to grey out the cell with the X not the whole row.

Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""x"""
Selection.FormatConditions(1) . Interior.ColorIndex = 16

View 4 Replies View Related

Weighted Average Of Specific Cells In Column?

Dec 30, 2013

I would like to find the weighted average of the values in the "score" column. Additionally, I would like to only find the weighted average if the student is jack and jane. I have attached my workbook for review.

View 6 Replies View Related







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