Average Calculation Only When Cell Has Data

Oct 5, 2009

Im trying to work out a function that will calculate the average accross a 3 column array. Obviously there is but I need to make any cell's with 'Free' give a value of 0.

I need some kind of IF("Free",1) type thing, to run before the average calculation, but I dont know how to put it together to make it work, I thought about a Loop, but then how do I make sure it only goes to the next cell in the selection?

View 9 Replies


ADVERTISEMENT

Calculation Of Average In Vba?

Feb 12, 2014

I use VBA with the macro recorder. Now I'd like to programming a code to calculate the average of three cells.

I've done a lot of measurements about 180 but it can be also more. For one test object I've always done three measurements to get then an average.

My values are beginning in cell C2:CXXX, D2:Dxxx and E2:Exxx. For example I'd like to get the average from C2:C4, D2:D4 and E2:E4. The result of C2:C4 I'd like to have in cell H2, the result of D2:D4 in cell I2 and the result of E2:E4 in cell J2. Then the next calculation is C5:C7, D5:D7, E5:E7 and the results in H3, I3 and J3. And so on.

I've attached my excel file, maybe I didn't explained it well. The VBA-Code is for sheet Export.

CalculationE.xlsx

View 5 Replies View Related

Formula For Average Calculation?

Jul 8, 2013

I have data regarding the percentage of QC for the team.

I need to find out the individual's average QC scores from the list already available.

The columns that is in the primary sheet goes like this: Date/Name/Comments/QC percentage

View 3 Replies View Related

Average NETWORKDAYS Calculation

Mar 26, 2007

I have three columns of data that pertain to this question:

1. Status (Open or Closed)
2. Assigned (names)
3. Date Opened (a date value)

I want a formula to calculate the AVERAGE NETWORKDAYS between Today() and the Date Opened where Status = Open and Assigned = .

I'm thinking it'll be a big, honking SUMPRODUCT formula but I can't figure it out. Honking is a ...'technical' term.

View 9 Replies View Related

Weighted Average Calculation

Sep 28, 2007

I just got Excel 2007 and wanted to know what formula to use to calculate the weighted averages in the attached excel file.

View 6 Replies View Related

Exclude Outliers In Average Calculation

Oct 14, 2009

Is there a good way of excluding an outlier in an average calculation. In the example below will I exclude 1000 from the average-calculation.

The way to decide excluding-values can either be a percent based on the range or everything that is a higher than a user defined value. It can also be more than one outlier.
A user defined function is OK with me, if it is impossible to use the built-in functions.

View 6 Replies View Related

Need Assistance With Average Calculation Formula

Jun 15, 2007

I get a "#value" error message when I utilize the formula noted below. I seperated it into distinct sections so that it is easier to view. Basically, what the formula is doing is determining whether if two values are the same, then take the absolute difference of the average of other values ,excluding one of the previously noted values, and compare that difference to a different parameter. If the difference does not exceed the parameter, then calculate the difference; otherwise the ending result is zero. Pls. note that the error seems to occur when I input the fifth section into the formula.

=IF(K23="","",IF(AND(K23=E23,ABS(B23-AVERAGE(F23:J23))>B20),B23-ABS(AVERAGE(F23:J23)-B20),

IF(AND(K23=F23,ABS(B23-AVERAGE(E23,G23,H23,I23,J23))>B20),B23-ABS(AVERAGE(E23,G23,H23,I23,J23)-B20),

IF(AND(K23=G23,ABS(B23-AVERAGE(E23,F23,H23,I23,J23))>B20),B23-ABS(AVERAGE(E23,F23,H23,I23,J23)-B20),

IF(AND(K23=H23,ABS(B23-AVERAGE(E23,F23,G23,I23,J23))>B20),B23-ABS(AVERAGE(E23,F23,G23,I23,J23)-B20),

IF(AND(K23=I23,ABS(B23-AVERAGE(E23,F23,G23,H23,J23))>B20),B23-ABS(AVERAGE(E23,F23,G23,H23,J23)-B20),

IF(AND(K23=J23,ABS(B23-AVERAGE(E23:I23))>B20),B23-ABS(AVERAGE(E23:I23)-B20),0))))))))

View 9 Replies View Related

Delete Cells After Calculation Of Average

Dec 2, 2008

I`m working on a compression of a picture. For most of you that probably is pea-nuts, but I really just stopped wearing diapers when it comes to excel. At this point I have a sheet in front of me with 300 rows (length of the picture) and 185 columns (breadth of the picture). The cells are pixels and contain values ranging from 0 to 255.

I now need to do an operation I simply can't figure out. I need to select four cells at once (A1:A2 and B1:B2) and replace A1 by the average of these cells and the other three cells should be emptied during that operation. This operation I should do for the whole sheet. In the end I should see a chart with values in every two cells (A1, A3, A5 ... for the first row) as the other cells will be emptied

View 9 Replies View Related

Weekly Average Commission Calculation

May 5, 2009

I hope this question has not been addressed but the closest I can find is in this link:
[url]

I am now a commission based contractor who started earlier this year & I want to be able to calculate my current average weekly income which should fluctuate greatly. I have a spreadsheet that works out what my current to date net income is but can't figure out how to break this down to a weekly avarage. My basic guess is that I want to take the figure provided and divide it by the number of weeks from "stated start date" to the current date (but on a divided by 7 basis?) to get my average weekly net income.

I am sure this is pretty simple for you all so I hope I am not wasting time it's just that if I try figure it out I am using something like WEEKNUM & that will fail after the next new year. -Although it would be better to base it all around the financial year if that can be done? (March 1st - April 31st in NZ)

View 10 Replies View Related

VBA Average Calculation Of The Values In Cells

Jan 23, 2007

In my Case Else, I have it set to take the Average of the values in cells M8 for all sheets other than the ones listed in my other Cases, same for M9, etc. for each worksheet I have.

The change I want to make is as follows: I'd like it say say if the value in Cell M8 is the same on all sheets then place x value in cell M8 on the active sheet, same for M9, on so on and so forth. Only if the values in Cell M8 for each sheet are not the same then take the average.

Private Sub CommandButton1_Click()

Dim sh As Worksheet, sum As Double, n As Long
n = 0
sum = 0
Dim arr() As Variant
Dim nbrOfAvgs As Long, i As Long
nbrOfAvgs = 19
i = 0 ....................

View 9 Replies View Related

Average That Omits Certain Cells In Calculation

Apr 19, 2007

my main goal is come up with an average for a certain range of values...but if a cell equals "continuation" then do not count it's corresponding numerical value towards the average. i've attached a sample of the problem.

View 2 Replies View Related

AVERAGE Calculation To Exclude Blank Cells

Sep 3, 2009

I have an array formula that calculates the average of numbers between two dates:

{=AVERAGE(IF('Date Range'!$B:$B>$H$4,IF('Date Range'!$B:$B<=$B$3,'Numbers to Sum'!$C:$C)))*100}

The start date is the day after the date in H4 and the end date is in cell B3. The dates are in column B and the numbers to sum associated with these dates are in column C.

Some of the cells in column C are blank and my formula is taking these blanks into account in calculating the average, while I would prefer not to count them in the calculation.

Can someone please suggest how I could amend the formula above to accommodate this?

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

Excel 2010 :: Average Calculation For Given Date And Time Range

Jul 9, 2014

Please find the attached 2010 version excel file <For a given date Time Range average .xlsx>.

I want to calculate the average value (Column C) for the given date (Column A) and given time range (Column B).

Values to be plotted in the color cells yellow and light pink / magenta.

Voting Results.xlsx‎

View 4 Replies View Related

Pivot Table / Create Average Of Proportions (Custom Calculation)

Aug 2, 2013

I am trying to find expected proportion of code per country by looking at current values. I have a list of countries and associated classifications (0-5) with counts, similar to as follows:

Country
code
count

USA
1
65465

USA
2
54651

USA
3
65411

[code]...

I am interested in creating a pivot table with the average of each code as a proportion of each country. The final table would be expected proportion of codes. The pivot table for this set would look like this:

Row Labels
Average

1
5.4%

2
3.9%

3
4.7%

[code]...

Mean per code of the proportion of code per country

View 1 Replies View Related

Lookup Formula: Commission Calculation To Be Done Automatically Once Data Is Inputted In Cell

Mar 25, 2009

I am trying to come up with a formula that will allow the commission calculation to be done automatically once data is inputted in cell A2 and E2. I have tried IF statements, but can not figure out how to make it work. I am not able to figure out how to get cells F9 and F19 to work with the proper formula.

View 4 Replies View Related

Average And Cell Data As Worksheet Name

Jan 12, 2007

1. if i use an average function, and there is nothing in the cells in the range that i am choosing, how can i get a zero answer rather than a # div/0 error. I have several sheets and several columns on each sheet where average is being used, but not all of the columns contain data. However, if the average is 0, i need it to show 0 and not the error.

2. is there a way to link a cell's data to automatically name a spreadsheet?

sorry if #1 is confusing, i've tried several ideas. i'm thinking that something like "if the value of (cell)=blank, then (cell value) = 0, but i don't know how to put that into formula format.

View 5 Replies View Related

VBA To Find Data In Table Then Doing Calculation With That Data

Jun 23, 2013

I have a table with 500 entries which is some physical properties for some chemicals. What I am needing to do is get something to find out what chemical formula the user has typed in another cell on a separate sheet, then VBA finds the component on this table and picks out information from columns within that row. Some of that data will then be used to do a calculation. The user can select up to 20 components, so VBA needs to be able to do it for 1 or anything in between 20 components. The data which I need to use for further processing is within columns D to J.

View 1 Replies View Related

Selecting Data And Using It For Further Calculation?

Jul 11, 2014

I have got historical intraday-data of a stock index and first of all need to summarize them by seconds: The data looks like that:

time price
08.00.00 159
08.00.00 153
08.00.00 148
08.00.01 157
08.00.01 152
08.00.02 167
08.00.02 151
08.00.03 155
08.00.03 154
08.00.03 154

So I want to calculate the average price per second. Is there any formula to tell Excel that it should sort it by second and further calculate the average price of it.

View 5 Replies View Related

Calculation Data Within Two Different Times

Jan 27, 2009

Im measuring arrivals of buses during a two hour period, for example 10 til 12 Within in this time i have 12 buses.

The Problem

What i need to do is calculate how many buses have turned up in a "rolling hour". This means taking a sample of any 60 mins within the two hours and calculating how many buses turn up. There needs to be a min of 6 buses in that 60 mins

In theoy there would be 60 "rolling hours" within a two hour period.

For example first 60 min is 10 till 11, second 60 min is 10:01 till 11:01 and so on.

View 8 Replies View Related

Calculation Of Data Between Two Dates

Oct 3, 2006

i am trying to find the formula which will calculate information that is between two dates. for example i have the dates Jan'05 right through to Dec'06 and in each month i have different values eg, Jan is 5, Feb is 10 etc. i need to find a formula which will calculate the data between Aug'05 and July'06.

View 8 Replies View Related

Making A Calculation On A List Of Data?

May 14, 2014

In it I have a list of different profiles (From autocad Civil 3D). With a column for the station value, and a column with the elevation. These profiles are arranged all below each other. In the example xls, I've limited it to 2 example profiles to make it a bit clear. The 1st few columns come from the export out of Civil 3D (with empty rows between them, but these are easy to delete). For each station of the profile, you have an elevation

What I need to do is calculate a 3D length for each profile. So manually you can do this with A=(B2+C2)^1/2, and then make a sum. Which is not really a problem if you have a list with 2 profiles. But sometimes we have a list with 100 profiles.

Optionally, it would also be handy that we then get a list in another sheet, with in 1 column the profile names, and next to it the 3D length.

My main question is: Is this possible with VBA? (I would assume it is..) Next, it would be handy if I could be directed in the right direction to produce these routines, because I don't have that many experience in vba.

View 3 Replies View Related

High Frequency Data Calculation

Oct 16, 2009

Suppose you have a large database, which consists of high frequency minutes data, you need to calculate differences in values between each different time intervals, e.g. from 1 min to 10000 mins.

the format is looked like below

1 min aaa
2 min bbb
3 min ccc
4 min ddd
.................
......................


More specifically, what I am supposed to do is to calculate aaa-bbb, bbb-ccc, ccc-ddd, and then aaa-ccc, bbb-ddd, and then aaa-ddd and so on.

I know the VBA has a function to do repeated executions but am not sure how to adjust the time intervals.

View 9 Replies View Related

Clear Cell Content Based On Another Cell Calculation

Dec 21, 2012

I have a cell A1 in sheet2 linked cell A1 in sheet1 (simply A1='sheet1'!A1). A1 in sheet1 is a data validation drop down menu.

I want to clear the content of A2 in sheet 2 everytime the content of A1 in sheet2 changes/is updated. That is everytime the value of A1 in sheet1 is changed using the drop down menu.

I tried using a Worksheet_Change event macro (which I do not fully understand) but it won't work with a cell that updates from a calculation. It also doesn't work if triggered from a cell from another worksheet (I tried linking it to cell A1 on sheet1 in this case).

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
Range("A2").ClearContents
End Sub

Any simple solution to clear the content of cell A2 in sheet2 when A1 in sheet2 updates?

View 3 Replies View Related

Automatic Calculation Of Cell Value When One Of The Variables (cell Value) Is Changed?

Oct 31, 2013

which will calculate value of a cell when one of the variables has been changed?

To illustrate what I have in mind, an ecxample:

* User can add values to cells using UserForm
- Component name (to Cell "A1")
- Component price (to Cell "B1")
- Component quantity (to Cell "C1")

[Code]....

View 3 Replies View Related

Code To Apply Calculation To Different Sets Of Data

Mar 5, 2013

I have an excel spreadsheet that performs a particular calculations using a large set of data. However, I have over 1000 sets of data that need to be feed into this sheet and obtain the output calculation. Obviously I don't want to have to copy and paste in each new set of data to obtain my result as this would take a very long time. I am brand new to VBA, so was wondering if there is a way to write code in VBA that will automatically perform these calculations for one data set, save the output into a cell, and then move to the next data set and so on?

View 4 Replies View Related

Averaging Data By Week - Automatic Calculation?

Jun 18, 2013

I need to average data following the format below by average per week by week/store combination e.g. wk 1/store A average is 6.

Week
Store
Sales

1
A
7

[Code] ..

I can easily use SUMIFS to achieve this, but I have a large amount of data between the weeks of 1-52, a dozen different stores and I will be adding to this. I don't want to have to enter new SUMIFS every time I enter a new wk/store combination. How do I get this info to automatically calculate?

View 3 Replies View Related

Data Sorting, Min/Max, Selective Calculation Function

Jul 30, 2007

I'm using Excel 2003 with WinXP SP2.

I'm trying to make a spreadsheet to calculate my GPA for my studies. I can get everything to work fine except I want to be able to calculate an adjusted GPA based on a certain value of classes to drop.

The way it would work ideally is that I would be able to search/sort a data set and if it contained "X" number of entries then the "Y" number of lowest marks would be omitted from the AGPA calculation.

I'm having trouble designing a function/formula or scheme to sort the data range, and identify the lowest "Y" number of entries and recalculate the GPA without using them.

View 9 Replies View Related

Calculation Using Last Value In A Cell

Jan 23, 2013

I have a list of prices but some cells contain multiple values where the value has changed. I need a formula that will use the last value in a cell.

Example below. As you can see the result column has now value as its using $3.41$3.117 in the calculation (I need it to use $3.117)

Price
Uplift
Calculation
Result

[Code]....

View 4 Replies View Related

Collate Data From Two Sheets And Paste It On Another Sheet And Do Some Calculation

Jul 18, 2013

I'm trying to collate data from two sheets (sheet1 & 3) , paste it on sheet5 and do some calc. But the macro keeps copying the same row after 2 iterations. Also the find function stops working after 1st iteration. Not sure what to do

Sub Macro17()
'
' Macro17 Macro
'
'
Sheets("Sheet1").Select
Range("B3:L3").Select
Do Until Selection.Row = 10000
Selection.Copy

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

View 5 Replies View Related







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