# Sumproduct With OR Logic - Count Number Of Rows In Dataset

Jan 17, 2014

I'm trying to count the number of rows in a dataset where column A is something, B is something, C is something, D is not something, D is not something else, and column E > 0 OR F is something but I just can't get the result I want.

My actual dataset is a staggering 294,000 rows and 46 columns so here's a simplified version:

## Multiple Criteria And SUMPRODUCT (count The Number Of Rows That Have Values Greater Than 10/01/2008 In Either Of Two Fields)

Jan 23, 2009

I am trying to count the number of rows that have values greater than 10/01/2008 in either of two fields. I tried following formula but instead of giving total number of rows, it returns a random date.

Nov 26, 2008

I am trying to get my head around sumproduct. So I had a go at trying to use the following formula to add data in odd columns.

=SUMPRODUCT(ISODD(COLUMN(A1:J1))*(A1:J1))

The formula below works but I don't understand whats wrong with the one above. Can anyone please explain how I would use isodd to achieve this? What am I doing wrong?

=SUMPRODUCT((MOD(COLUMN(A1:J1),2)=0)*A1:J1)

## Sumproduct: Count Number Of Leaves Within A Specified Period

Nov 5, 2009

=SUMPRODUCT(SLVL!\$B\$6:\$B\$49>=\$A\$2)*(SLVL!\$B\$6:\$B\$49<=\$B\$2)*(SLVL!\$A\$6:\$A\$49=A12)

I'm sure that there had been an error somewhere but I can't figure it out. I'm getting zero value. Situation: need to count number of leaves within a specified period, thus I opted to use Sumproduct.

## SUMPRODUCT Multiple Ands/ors (count Of How Many Rows)

Jan 26, 2009

I'm having trouble with SUMPRODUCT. I would like a count of how many rows where:

Column A = PP
and
Column B = QQ or RR or SS
and
Column C = TT or UU or VV

## Sumproduct Query: Count Number Of Days Holiday

Jun 29, 2009

I have a formula which I have copied from one of your good selves and tried to adapt it. The formula is below. I a am getting #NA as my answer.

=SUMPRODUCT(ISNUMBER(FIND({"h","H"},B11:G11))*{0.5,1})

I have a person name in Colomn A and then 1 week B-G on a row and want to count number of days holiday.

## SUMPRODUCT With Multiple Criteria: Count The Number Of Documents

Nov 3, 2009

I have attached a spreadsheet with a small indicative data set to assist in understanding. I am trying to count the number of documents each individual has assigned to them that are not yet 'completed' (ie REGISTERED, IN WORK, REVIEWED). The problem I am trying to overcome is that the document state can be 1 of several values indicated in the same column.

I have tried using this SUMPRODUCT formula:
=SUMPRODUCT(((\$E\$2:\$E\$11="REGISTERED")+(\$E\$2:\$E\$11="IN WORK")+(\$E\$2:\$E\$11="REVIEWED")*(\$B\$2:\$B\$11="Jones")))
but it is generating incorrect values!

Specifically:
- Jones shoulld return 1
- Franks should return 3
- Smith shoudl return 0

## Requesting A SUMPRODUCT Command That Will Give A Count Of Rows Where All Of The Follow

Aug 25, 2009

Requesting a SUMPRODUCT (or other) command that will give a count of rows where all of the following three things are true:

column A = P
(column B = Q or column B = R)
column C = S

## Sumproduct (count The Number Of Unique, Or Distinct, Company Names In Column)

Jan 28, 2010

I want to count the number of unique, or distinct, company names in column [C7], subject to two conditions that will exclude certain unique company names from the count.

I should also point out that most company names appear multiple times in column [C7].

a) Count the unique company names in column [C7]...

b) ...including only those companies who have at least one "Yes" in column [C8] somewhere among their records

c) ...and who also have at least one value equal or greater than "1" in column [C15] somewhere among their records

Note that that there is no requirement that the "Yes" and the "1" ever appear in the same record.

## SUMPRODUCT Use But With Unknown Number Of Rows?

Sep 15, 2012

I need to put a value on every line having "file:" in the second column. The value requested is a sum of the numbers in the forth column following this line until the next "file:" line.

I know it is not trivial, but sure it is possible.

57
file:
HIRES-~1
#VALUE!

58
208
1
1

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

## Find All Number Combinations In Dataset That Add Up To Specific Number?

Jun 3, 2014

I have attached an example. If I have a set of numbers such as the one attached, is it possible to create a formula that will show me all the combinations of numbers that add up to 55.52? In the attached I have highlighted in different colours all the number combinations that add up to 55.52. The numbers highlighted in blue appear within more then one combination. Is there a formula that can do this for me, instead of randomly adding numbers hoping they add up to 55.52.

## Find All Number Combinations In Dataset That Add Up To Specific Number

Jun 4, 2014

I have attached an example. If I have a set of numbers such as the one attached, is it possible to create a formula that will show me all the combinations of numbers that add up to 55.52? In the attached I have highlighted in different colours all the number combinations that add up to 55.52. The numbers highlighted in blue appear within more then one combination. Is there a formula that can do this for me, instead of randomly adding numbers hoping they add up to 55.52.

examples.xlsxâ€Ž

## Pivot Table To Count Unique Items In Large Dataset

Oct 15, 2012

I'm trying to count how many production orders i have per week. However, there are duplicated production orders per week. I only want to count how many unique orders there are for each week. I only see the ability to "Count", which counts my duplicates as well so it over inflates my true quantity.

## Number Comparison And Logic Statement

Feb 8, 2007

I'm having a problem with coming up with a suitable excel formula. I have a table that calculates 2 values. Once these values are derived I need them to be compared to a separate table. This is how it works.

Table 1:
Cell B8 gives me total weight: 3187pounds
Cell C9 gives me the center of gravity in inches: 142.02

on sheet2
Table 2: Cell A2-A26 have weight increments every 50 pounds starting at 2200.
Cell B2-B26 have the minimum C.G. limit
Cell C2-C26 have the maximum C.G. limit

My question is how can I write a formula that takes the weight from B8 and compares it to the cells on sheet two (rowA) and finds the closest weight. Then from there finds out if my C.G. from C9 is within limits of my min and max values?
Sounds complex but it's not that bad. I'll upload the file to my website and let people download if they'd like to see it.

## Group Numbering Rows By Logic?

Mar 27, 2014

I tried to make attached worksheet self-explanatory. find attached.

Basically, I want to number group of rows based on a logic (blank A,B, and C columns)

inincubus.grouprows.xlsx

## Summing Multiple Rows Using Logic?

Feb 3, 2009

I'm going nuts trying to figure out what formula I could use to give me totals in columns Q and R of the attached file. Basically, in the Weekly Totals column, I want to populate how many Customers and Bags were handled according to each ship name (the data is in the table to the left). Any suggestions would be GREATLY appreciated, I'm taking stabs in the dark but am not coming up with anything that works.

## DeletE All Rows In A Dataset

Mar 29, 2007

I am looking for a macro that is capable of deleting all rows in a dataset where the following statements are not true: column B is equal to "OP00" (o, p zero zero), the left hand character of C is equal to "L" and D is equal to "CC", as in the scenario below. I basically need to keep all rows which match the structure below, i.e. to clean the data.

B C D
OP00LKAOCC
OP00LMRPCC
OP00LVOFCC
OP00LVOFCC
OP00LVOFCC
OP00LVOFCC

## Coloring Entire Rows Based On Certain Logic

Aug 1, 2014

Here is my attachment with data in first sheet and expected output in second sheet. Have given comments in second sheet for better understanding.

Data is of a debt collection, in sheet column F "form #" denotes loan form numbers and column L "paid" denotes the amount received or not received.

In this Form # are unique and form number will repeat with different paid amount.

Entire row to be colored based on the sum value of paid column amount of respective form number.

1. non repeated single form number with negative value of paid - Orange color

2. repeated form numbers with sum of values in paid column as positive value - only entire row of form number with negative value in blue color

3. repeated form numbers with sum of values in paid column as negative value - first form number row to be colored with yellow and rest of repeated form numbers with purple color and its sum value (negative value should be made available in yellow line of the Form # group to the right of right most column data)

4. form numbers and paid column of value "0" - pink color

I tried recording and edited macro only for the logic of paid value "0" and confused with other logics and declaring variables...

## Deleting Rows Of Data The With Use Of Boolean Logic

Feb 6, 2009

I've got a worksheet with five columns of data. The headings run from a1:e1

The number of rows can be anything up to 200,000 rows (I'm using Excel 2007).....

## Return Number Of Days In A Month From Dataset

May 7, 2014

I have some data & want to count the individual number of days for each month.

Example attached..

## Patient Dataset - Consolidating Rows

Dec 3, 2013

I have a large patient data set consisting of one column that includes their zip codes and one column that includes the number of times they were seen at a hospital over a period of time. I want to try to consolidate the data so I just have the number of total cases (for all patients) in a certain zip code over that time period. There are several thousand patients and it would be great to avoid doing it manually.

## Rearrange Dataset From Columns To Rows

Feb 23, 2014

Rearrange dataset from columns to rows

However, the solutions do not work if "species " are text instead of numbers:

Parcel
Species1
Species2
Species3

[Code]...

## Count The Number Of Rows

Aug 10, 2009

ÁreaAplicação Tp ModeloData Produção
SPCContas Internacionais PDM01-01-2009
OPEDOL PDM02-06-2009
OPE PCOL PDM01-04-2009
OPESINTRA PDM12-03-2009
SPCSGF PDM04-05-2009
SCMControlo Vendas PDM21-02-2009
SCMClientes Ocasionais PDM03-04-2009
SPCContas Internacionais LDM14-01-2009

i need to count the number of rows that have the Tp Mpdelo="PDM" and The Date is lower of "31-03-2009".

## Excluding Rows Containing A Specific Blank Cell From Logic

May 1, 2006

how to exclude a blanck cell from logic?

I have tried what you see below but neither works as desired.

If Not vData(n, 9) = 0 Then

If Not vData(n, 9)Is null Then

have corrected code error

## Counting Total Number Of Days In Specified Period For Dataset

Sep 25, 2013

I am trying to find a way of counting the total number of days medical devices were in-situ for a fairly large dataset.
The worksheet has a few thousand rows. Column A - unique identifier for patient; column B - date inserted (Aug 02 - Aug 13); column C - date removed or audit date. There is no missing data, all rows have both dates. Some devices in for few days or weeks, some for up to 7 years.

I want to count each 12 month period (starting 1 Aug 02) the total "device days" for that year. (e.g. if device inserted 1 Feb 03 and removed 1 Apr 03, in year period starting 1 Aug 02 would have been in for 59 days. Another device inserted on same day and not removed until 9 Sept 05, would for first period (01/08/02- 31/07/03) 181 days, second period 366 days, third 365 days and fourth (01/08/05-31/07/06) 39 days). Therefore for the two rows, the first period total would be 240 days (59+181).

## Extracting Rows In Dataset Based On IF Criteria?

Jun 15, 2013

I have attached two documents. One is called "Zone Destination" which is a template I designed. The other file is called "Schedule5_4" which gets downloaded from a work server once a week that contains all employees and their shifts for the entire week. What I am able to do so far is extracting the first row using index and match but I don't know how to extract any of the rows that follow. an employee might have several rows for one day based on a lunch or if they are working in multiple zones during their shift.

Zone Destination File -- start tab has the template in place that gets copied over when you create a new tab.
-- employeeroster tab contains the employee roster that i use to match with the schedule5_4 file. i changed the names and also reduced the amount to make it easier to read. i have over 80 employees but for this example, i only made up a handful.

schedule5_4 File -- this file contains all the data that I need to pull from. The criteria that I am using is by employee and date. I'm matching from the employee roster tab and also the date in cell a1 located in the zone destination file.

[URL]

## How To Count The Number Of Rows Until A Blank Row

Dec 29, 2012

I want to be able to count the number of rows until I hit a blank row, and use the counter as an index. How is that possible?

I have a no. of rows that are fulled, followed by a blank row then another set of rows that are filled then a blank row etc. I want to count the rows filled till the blank row and set the counter to that number. Then I want to do the same with the next set of rows etc.

## Count Items That Appear In A Number Of Rows

Mar 12, 2009

I would like to count items that appear in a list that will also appear in several rows. The list is also in no particular order. I have attached an example which may make it clearer than a wordy explanation.

## Count Number Of Used Rows In A Listbox

Jul 11, 2009

I have a text box that I would like to populate with the total number of lines used by a listbox.
I tried:

## To Count The Number Of Rows In Each Sequence

Dec 11, 2005

I have in column AU cell 39 to cell 500 random sequences of 1-10 rows ,
with numbers in them, (as an result of formulas)
I need to count the number of rows in each sequence that have numbers
of 35 or less , but only up to the first number of 35 or higher. eg:-

AU result
row 39 32 3
40 14
41 19
42 107
43 11
44 21
45 #value!
46 40
47 45
48 16
49 15
50 #value!
51 29 2
52 11
53 146
54 14
55 17
56 11
57 #value!

and so on down to 500 rows