Array Formula: Add Data Which Meets Certain Conditions

Jan 1, 2009

I'm working with wookbooks used company wide and I cannot add any helper columns which would solve the problem. I need to add data which meets certain conditions see attached workbook for a sample.

View 5 Replies


ADVERTISEMENT

Summing Data That Meets Two Conditions

Jun 1, 2009

I want to sum certain data, which meets two conditions.

My data set contains three columns and a lot of rows. The columns are the following:
PostalCodeDeparture
PostalCodeArrival
PassengersInCar

I want to sum the total number of passengers with departure postal code 5100 and arrival postal code 5110. (and I want to do the same for all other postal code combinations in the data set)

With "SUMIF" I can only include one condition.

View 4 Replies View Related

Countif (check The Data For The Following Conditions, If It Meets The Crirteria Then Place A 1 In Columns)

Aug 22, 2009

the traditional count if statement doesnt return what I need. I have an array of values that need to be checked.

Column: A B C D E
Data: .25 .49 .18 (Criteria 1 Result) (Criteria 2 Result)

What I need to do is check the data for the following conditions and if it meets the crirteria I need excel to place a 1 in column D or E.

Criteria 1
If any of the coulmn data contains a value less than .5 I need a 1 placed in column D

Criteria 2
If any of the column data contains a value greater than .5 but less than 1.0, I need a 1 placed in Column E. I tried using an IF/ Count If statement, but cant seem to get it to return the result I need.

View 5 Replies View Related

Delete Entire Row If Meets Multiple Conditions

Aug 26, 2013

I am trying to create a macro to accomplish the following task. Delete if the value belongs to queue "ab cd ef" and is also a part of category "xxx xxx".

I wrote the following code, but it seems it is doing some mistake:

Code:
LastRow = Range("Z2").End(xlDown).Row
For i = 2 To LastRow
tempQueue = Range("C" & i).Value
tempRange = Range("Z" & i).Value
If (tempQueue = "ab cd ef" And tempRange = "0 - 1 day") Then
Range("C" & i).EntireRow.Delete

[Code] ........

The above code works fine but it deletes only 120 rows out of 200 or sometimes 150 out of 200. Can't get it to work all 200 rows.

View 4 Replies View Related

Array SUM Formula With Range Of Conditions

May 14, 2014

1) Input data are static and helper columns can be added if needed.

2) Filter will be dynamic range (in attachement is the filter static), and the count of years can be changed on users request. So there could be only 2011, but also 2011+2012, 2012+2013+2014 etc.

3) In col 'J', the is what I know to do, but I do not want to use SUMIF+SUMIF+SUMIF... for each year (the count of years will change througt time as mentioned above).

View 3 Replies View Related

Array Formula To Evaluate Two Conditions

Jan 16, 2010

I have a spreadsheet that contains two worksheets called: MasterApplication and LocalAdmin. The Local Admin worksheet as shown below contains the following information starting on row A1:D456 ....

View 9 Replies View Related

SUMIF Or An Array Formula - Matching Multiple Conditions

Jan 14, 2009

I would like to have a formula in one cell that finds records on another sheet that meet certain criteria, and produces a sum of the total quantities associated with that record. The attached workbook has more details as to what I am trying to do.

View 2 Replies View Related

Array Formula- Idenify The Location Of Each Row In Which All The Conditions Are True

Nov 9, 2007

My formula below work perfectly. I was wondering if their is a way for me to idenify the location of each row in which all the conditions are true. So, for example, if the formula generates an answer of 2, in a different cell it would give me the address of the 2 rows.

=SUM((K9:K72/L93))-SUM((K9:K72/L93))

View 9 Replies View Related

Formula To Ignore Blank Cells And Copy Data That Meets Criteria?

Apr 27, 2014

I have a worksheet (Data) that lists when pupils are in for Nursery sessions during the week. If they are in they have a 3 (hours) by their name in the relevant columns.

In the AM worksheet I now need to pull through a "register" so under each daily heading I need to pull through everyone that has a 3 next to their name under Monday AM / Tuesday AM / Wednesday AM etc. from the Data sheet. However, I don't want it to copy any blank cells. I then need to do the same for the PM sheet.

View 2 Replies View Related

Sum Range Of Data From Array Of Conditions

Mar 15, 2014

I am trying to pick certain data from a table and sum it in order to produce a formatted report.

The data has many different items of which I want to pick certain ones to sum on one line

See attached and some of the formula's that I have used, but aren't quite what I'm after

The formula I want to use is .... VLOOKUP(E5:G5,A14:C23,3,) ......

But it wont reference a range (E5:G5) !!! and I also want the formula to ignore blanks (as blanks in the data file are actual totals).

View 2 Replies View Related

If Cell String Meets Criteria Then Clear Contents From Array On Same Row

Jul 17, 2013

I'm attempting to clear the contents from a range of cells on rows where a cell string may equal R, X, XX, Y, Z, ZX, #N/A.
The macro runs fine until it gets to a cell that contains #N/A. How to get this to work?

Sub Recalculate()
Dim r As Integer
r = ActiveSheet.UsedRange.Rows.Count

Application.ScreenUpdating = False

For Row = 13 To r

[Code] ........

View 2 Replies View Related

Sumif Formula The Meets Five Different Criteria

Feb 15, 2010

I want to create a sumif formula that will sum the data if it meets five different criteria. I tied to do an “Or” statement in the formula, but it doesn’t work. For example, I want to sum all the rows that contain: Apples, Bananas, Cherries, Pears, and Plums. How do I write the sumif formula so that it will do this?

View 9 Replies View Related

Delete Formula If Cell Value Meets Criteria?

Feb 18, 2014

I'm using the following on the Worksheet_Activate event to update rows with the date, (Cell AD1 contains the current date):

Code:
Range("X2:X2000").Formula = "=IF(IF(ISBLANK(W2),,$AD$1)=0,"""",IF(ISBLANK(W2),,$AD$1))"

Is there a way I can amend it so it only updates those cells which currently have no data?

At the moment it is changing every cell with the date which overwrites existing dates - I want it to update the new stuff only.

View 3 Replies View Related

Formula To Return Cell That First Meets Certain Criteria?

Mar 5, 2014

Say I have a column of cells filled with numbers that are ascending. What I would like to do is to pick out the first cell that meets my condition. For instance, these cells contain irrational numbers that increase from 0 to 100. I would like a formula to pick out the first cell that exceeds 10.2, and to return the row number of that cell.

In the case of descending numbers, if I would like to pick out the first cell that goes below 10.2, would the formula be the same?

View 3 Replies View Related

Find The Correct Formula To Sum Text That Meets Two Criteria?

Mar 27, 2014

I'm trying to find the correct formula to sum text that meets two criteria. If C2:C1023 is Equal to TEXT from J8 and F2:F1023 is equal to TEXT J4 add up the total times J4 shows up in C2:1023

=SUMPRODUCT(Sheet3!C2:C1023=J8,Sheet3!F2:F1023=J4,Sheet3!C2:C1023)

View 11 Replies View Related

Excel Formula To Retrieve Data From Two Cells With Certain Conditions?

Jul 4, 2014

cell: A1 = 1st data
cell: B1 = 2nd data

cell: C1 = 3rd data

1. If A1 = 85 (exact 85 only)
and if B1= < 25
then c1 = 0.21

[Code]......

View 5 Replies View Related

SUMIF Sum All Data That Meets 1 Or 2

Nov 28, 2005

Suppose I have some data with a code for each data point:
1 100
1 200
1 300
2 400
2 500
3 600

The first column is the code and the second is the data. I can use a SUMIF statement to sum all the data that have a certain code (like 1). What if I wanted to sum all data that meets one of a number of codes? Suppose I wanted to sum all data that meets 1 or 2. I know I can do this with 2 separate SUMIFs, but I was wondering if there was a way to do it with one.

View 9 Replies View Related

Formula That Counts Number Of Unique Text Values If Meets Criteria

Nov 6, 2013

I have been using this function to count the number of unique text values in a data set:

=SUM(IF(FREQUENCY(MATCH(B2:B10,B2:B10,0),MATCH(B2:B10,B2:B10,0))>0,1))

It works great if I want to count number of unique text values overall. However, I want to count the occurrences of unique text values if they meet specific criteria. (Like a countifs function would if it could count unique text).

View 7 Replies View Related

Returning Text If Data Meets Certain Criteria

Apr 24, 2014

IN column J(on sheet 1) i want it to return text (OB) if Sheet 1 column A1 equals Sheet2 Columns A1:A500. And if Sheet 1 column A1 do not equal Sheet2 Columns A1:A500 return text(IB).

View 1 Replies View Related

Slicing Array Based On Conditions

Oct 19, 2011

Given an input array (result of a calculation )

Input Array = [3 4 9 1 0 5 7 2 0 6 10 8 ]

Depending on the number and location of the zeroes, I would like to create a sorted array whose

- number of rows is determined by the number of zeroes in the input matrix (i.e number of zeroes - 1)

- number of columns determined by the the size of one maximum number of elements in one of the smaller arrays. The remaining entries on the other shorter rows will be made zero.

For the above example sorted array becomes a 3X4 array

1 3 4 9
2 5 7 0
6 8 10 0

Example 2

Input Array = [9 4 5 0 1 7 6 2 10 3 8]
Sorted Array is a 2X7 Array
4 5 9
1 2 3 6 7 8 10

I would like to generate this array in VBA (rather than writing/reading in a worksheet) as it will save a lot of calculation time.

View 3 Replies View Related

Pulling Data From Multiple Columns If Meets Criteria

Aug 13, 2012

Have a worksheet Pricelist, require to pull data from the columns to a new worksheet only if qty is more than 0, and delete empty rows afterwards. Required result is in worksheet order. Original file is about 10K rows.

Attached sample file : example.xls

View 3 Replies View Related

Finding Data In Column That Meets Multiple Criteria

Jun 16, 2014

Any quick way to extract data from a table. I need to extract a value from a column that meets criteria from two different columns. I thought I could get this to work with vlookup, but have had no success. Sample data below in table 1 and I would like to get my data into table 2.

elevation
type
grade
percent
weight

5000

5000

5000

5020

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

View 9 Replies View Related

How To Make A Macro Take Action When Data Meets Certain Criteria

Feb 6, 2010

I am watching 100 stocks when the stock market opens at 9:30 EST. Not all the stocks will come available to buy or sell at 9:30 but will become available at different time intervals, sometimes 10 minutes after the market opens. When a stock opens it is common for it to spike up, then spike down, then go into a "normal" trading pattern, this is called a slingshot pattern.

If I have a predetermined price up or down for 100 stocks, how can I write a macro that will look at the stock prices and if it shoots above or below a certain value it will submit a buy or sell order? (I already know how to submit the buy or sell orders, just need to get an idea of how to get the macro to constantly check the prices and if it meets my criteria to take action.)

Note: I already have a macro running at one minute intervals to collect data. One minute intervals is to long, I need it in second intervals or less to pick up the slingshot pattern. Is this possible?

View 9 Replies View Related

VBA - Collecting Array Of Sheets Based On Conditions

May 11, 2011

I need a code to select sheets with pages less than 15 to print out. Also, a code to print out just the first 5 and last 5 pages if its more than 15 pages.

I've tried this so far but no success:

For X = 1 To Worksheets.Count

If Y Is Nothing Then
Set Y = Sheets(X)
Else
If ExecuteExcel4Macro("Get.Document(50)") < 10 Then
Set Y = Union(Y, Sheets(X))

End If
End If

Next X
Y.Select

View 6 Replies View Related

How To Filter Multidimensional Array Based On Conditions

Jul 18, 2014

How to apply a filter over the array "a" shown below and get the result in a new array "b" containing the filtered values based on the following conditions (the conditions criteria could be 1, 2 or 3. In this case only 2):

Criteria1 in Column 4="yellow"
Criteria2 in Column 3="ggg"

And only show values of columns 1 and 3.

If were using an SQL query would be something like this:

Code:
SELECT F[1],F[3] FROM "Table" WHERE F[4]="yellow" and F[3]="ggg"
The output array would be as below:

Code:
b=[{12,"ggg";140,ggg}]
this is the array:

Code:
Sub test()

a = [{"122","53","ggg","yellow";"140","9","ggg","yellow";"16","-22","ddc","yellow";"127","-37","ddc","green";"53","-28","ggg","grey"}]

'Filter code to get array b
'
'
End Sub

View 1 Replies View Related

How To Filter Data By Array Formula

Dec 23, 2013

My Sheet1! looks like (image attached)

On Sheet2! i want to import all rows belongs to Nov-13. Similarly on Sheet3! all rows belongs to Dec-13 ... How to do such dynamic filter using array formula?? I need array as my data source is a form & new rows will be added everyday. I want to do that by formula not using spreadsheets 'Filter" option.

Expected result will looks like below (All Nov-13 rows will return)

View 3 Replies View Related

Data Binning And Array Formula

Apr 5, 2007

see attachment. I would like to calculate the average of the values whose time values fall in between the lower and upper time limits. Or let me rephrase that: If a given amount of time vector entries falls in between the lower limit time vector (at row x) and the upper limit time vector, then I would like to calculate the average of the corresponding value entries. (oh, not only the average but also the standard deviation)

Searching the forum I found a similar entry, but unfortunately Andy Pope's solution attachement seems to be missing: [Solved] Formulas: Counting within bin sizes. I have tried to use the same approach (see attachment) but only came up with counting the frequency instead of calculating the average.

View 4 Replies View Related

Summing Values From Array W/ Multiple Conditions-cols

Oct 1, 2007

I know there have been many posts about multiple conditions in arrays, but I didn't find one that applied to my situation, so I'm hoping can help me out of jam. I'm using Excel 2000 on XP.

I have a database of sales information. Customer name is listed in column C, and columns F through Q contain the sales for the months of July - June (fiscal calendar year), with the headers for the months in row 4. There can be many rows of sales for the same customer, hence the need to sum them.

Example

C F G H
CUSTOMER JULY AUGUST SEPTEMBER
customer1 2 3 4
customer1 2 3 4
customer2 2 3 4
customer2 2 3 4

The problem is that this information will need to be updated every month to reflect sales year-to-date, meaning that the conditions for summing the data will change depending on how far into the year we are. So for instance, in August I will need to sum all the records for customer1 in the July column (column F) and the August column (column G), but next month it will have to sum the records for customer1 from July, August, and September (col H).

The result of this information would be displayed on a different worksheet. My thought was to assign a range of 12 cells (Sheet2!A1:A12) and to populate those cells with any of the months that need to be summed thus far. So for example, through September, A1 = "July", A2 = "August", and A3 = "September". Then the formula would use those values to evaulate the conditions. So in plain English the formula would:

sum the values in columns F : Q where the monthly header = the values in the range Sheet2!A1:A12 for all records where CUSTOMER = CustomerName

View 9 Replies View Related

One Array Formula To Sum Product With Weighting Data

Jun 11, 2014

My problem is a little more complex than sumproduct.

I have a ratings column and exposure column. I want to weight those ratings before doing a sumproduct, at the same time ignoring #value.

In the attached file, I want to achieve the green cell in one go, based on the orange raw data.

Attached File : Weight Data.xlsx‎

View 2 Replies View Related

Using Data From Input Box In Array Formula In Macro

Nov 10, 2011

I often have to research long sheets of data, which requires filling data in on my research sheet from several different sources. The research sheet has a file # in A and a vendor # in C. The data sources have the file #s & vendor #s in varying columns, but I use a pivot table to end up with file # in A, vendor # in B and the needed data in C.

The length of the research sheet varies from month to month - often 800-900 rows, so you can imagine how tedious it is to find the correct file #/vendor # combination to plug the data in. (Many of the rows on the research sheet will not have a row on the data source sheet.)

I managed to get an array formula in one of the columns on the research sheet that actually DOES work:

Code:

{=INDEX('Acct Activity'!C$1:C$7,MATCH(A7&C7,'Acct Activity'!A$1:A$7&'Acct Activity'!B$1:B$7,0))}

But the problem is that it returns #N/A in any row that doesn't have any data. This messes up the sum formula in the farthest right column. So, I tried to incorporate an ISERROR in with the formula, but couldn't get it to work; it left all the cells blank.

In the meantime, I got to thinking that, since there are up to 3 columns requiring data on the research sheet & each column's data comes from a different source, wouldn't it be great to have a macro where I could use a couple of Input Boxes: 1 that would let me click on the column where the data NEEDS to go & 1 that would let me tell it (either by typing the worksheet name or by clicking on the worksheet " PREFERRED " where the data come from)!

So, I spent the entire day yesterday trying to make any of that work & can NOT figure it out! I got the macro to pop up the first input box, & can key in the column letter, but clicking OK doesn't do anything. Yesterday, I had it so I could click OK & the box would go away, but nothing else happened & the second box wouldn't work right.

THEN, I started trying to figure out how to do an array formula in a macro & my head nearly exploded! I have a terrible time trying to understand written descriptions if they're in "tech speak", so it was all greek to me.

Here is all the farther I got with the macro:

Code:

Sub ClearingRsch()
' Jenny 10092011
With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
.DisplayAlerts = False

[Code] ......

View 9 Replies View Related







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