CountIF Multiple Parameters
Jun 18, 2009
I have a long list of past jobs, around 4000+. I have multiple fields, but I really wish to concentrate on the:
1) Job Type - Example would be Medical or Imprint
2) Job # - Correlates when it was done - Example would be 91059 would be a job within 2008-2009 fiscal year.
All the jobs are listed in the first spreadsheet. The second spreadsheet will hold generalized data broken down by the Type of Job and the fiscal year it was done.
I wish to first count how many jobs fit a specific job type. This was easily done:
=COUNTIF(Data!A2:A4121,A7)
A7 = Medical
A1:A4121 = the range of the names.
Count comes up as 346, which is correct.
I then want to add another parameter to break up the 346 by fiscal year. It ranges from 05-06 to 08-09. I came up with this:
=COUNTIF(Data!A2:A4121,A7)-COUNTIF(Data!F2:F4121,"9????")
Since the job # correlates to the fiscal year it was created, anything starting with 9 is a job done in 08-09. Anything starting with an 8 would be of course 07-08 range. I would have multiple fields with each different fiscal year.
However, when I put the 2nd formula in the function didn't work. It keeps the count at 346, which I know is wrong. I am not sure if I did something wrong here. Been looking at this for an hour and can't figure out what is wrong. The jobs that are medical within 08-09 fiscal year should be 120, but it keeps at 346.
View 14 Replies
ADVERTISEMENT
Oct 18, 2011
Im currently using the below formula but was wondering if its possible to combine the parameteres that im looking up in coulmn L in sheet one so i dont have to do the formula three times? something along the lines of={"P11111";"P22222";"P33333"}?
=SUMPRODUCT(sheet1!S$3:S$10000;--(sheet1!$E$3:$E$10000='sheet2'!$B$2);--(sheet1!$Q$3:$Q$10000=678);--(sheet1!$N$3:$N$10000='sheet2'!$D23);--(sheet1!$L$3:$L$10000="P11111"))+SUMPRODUCT(sheet1!S$3:S$10000;--(sheet1!$E$3:$E$10000='sheet2'!$B$2);--(sheet1!$Q$3:$Q$10000=678);--(sheet1!$N$3:$N$10000='sheet2'!$D23);--(sheet1!$L$3:$L$10000="P22222"))+SUMPRODUCT(sheet1!S$3:S$10000;--(sheet1!$E$3:$E$10000='sheet2'!$B$2);--(sheet1!$Q$3:$Q$10000=678);--(sheet1!$N$3:$N$10000='sheet2'!$D23);--(sheet1!$L$3:$L$10000="P33333"))
View 5 Replies
View Related
Apr 29, 2014
I have a below table as below
A B C
a aa 1
a aa 1
a dd 1
a aa 1
b aa 1
b bb 1
b aa 1
b bb 1
c cc 1
c bb 1
c bb 1
c cc 1
d cc 1
d aa 1
d bb 1
d cc 1
When i put the formula
=SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"}))
it returns 12 However when i put
=SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"},B1:B16,{"aa","bb"}))
it returns only 5
I don't want to use multi formula like
=SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"},B1:B16,"aa"})) + SUMPRODUCT(SUMIFS(C1:C16,A1:A16,{"a","b","c"},B1:B16,"bb"}))
I want to achieve this using SUMIFS only
View 5 Replies
View Related
May 8, 2009
In the attached file I have a sheet containing my data in A1 - D73. Column A contains a list of names, Column B contains a specific month, Column C contains a specific category and Column D contains the raw data.
Is it possible to create a formula similar to VLOOKUP to look not only at Column A, but to look at Column B as well in determining the value returned? I would like other users to first select a name and then select a month to view the data. I've attached a sample of what I've created so far. The original file contains 14 Names, 9 Months and 40 Categories.
View 3 Replies
View Related
Mar 12, 2014
I would like to have set of data as Parameter if possible.
Example: In Microsoft Queries I have two data sets. In first one shows let's say Item Number, and second one I should have table with components of all Item numbers listed in first table.
So first table I set one Parameter (?) and i get like 8 results. I would like that second table takes those 8 results (sometimes more or less then 8) as parameter and shows data (components) for them.
If I set sign '?' I can only select one cell as parameter, is there any way I can select multiple cells as parameter and use it like SQL function IN ?
Code:
SELECT 1.ITMNR, 1.COMNR, 1.QTYPR
FROM 1.1.1 1
WHERE 1.ITMNR IN ?
And second table should look for results in first table under 1.COMNR and select it as 2.ITMNR
Code:
SELECT 2.ITMNR, 2.COMNR, 2.QTYPR
FROM 1.1.2 2
WHERE 2.ITMNR IN ?
View 4 Replies
View Related
Apr 17, 2003
how to pass multiple parameters using a range of cells to MSQuery? When I try to it tells me that I can select a single cell only. Anyone know of a new and improved sql driver to use with Excel?
View 9 Replies
View Related
Mar 11, 2008
I get about 10 text files at the beginning of each month that I need to import into Excel. The file layout does change slightly from month to month so I have an Excel spreadsheet with the layout as the first worksheet. Each text file is in fixed layout form rather than delimited. The structure of that page is that the name of the first text file is in cell A1. The cumulative field widths are below that and the data formats are next to the field widths (in the adjacent column “B”). T=Text, G=General, D= Date with 3 flavors of Date: YMD, DMY and MDY. For the second text file, it repeats the structure in columns “C” and “D”, the third text file in columns “E” and “F” etc. What I would like is for the macro to open the first text file (based on the name in cell A1) and import it into a new worksheet (same file) using the cumulative field widths in A2 through A8 and the formats from B2 through B8, then import the next text file to a new worksheet (same file) using the cumulative field widths in C2 through C8 and the formats from D2 through D8 and keep going until all the files have been imported. The sheet names should be the same as the file that is imported (the “.txt” part of the file name isn’t important). I’ve attached a copy of the Excel spreadsheet that has the file names, field widths (cumulative) and field formats and a 2 row sample of the text file for the first import.
View 6 Replies
View Related
Nov 17, 2009
Is it possible to set parameters on a query but use a wildcard to return all instances? I have a query that I want to be able to set multiple parameters on but give the user the ability to select as many or as few parameters as they want to see. 2 of the parameters are number fields and 2 are text fields with no spaces.
View 4 Replies
View Related
Sep 24, 2008
Following on from: http://www.excelforum.com/excel-misc...s-formula.html
I used the above formula to work out how many days a call went out of our SLA, that works great (puts the values into K)
View 4 Replies
View Related
Oct 8, 2008
I am trying to create a formula that will tell me how often our sales reps are going to specific accounts. I have a master list of each persons accounts and next to each account name there will be a cell with a formula in it. This formula will look at the cell next to it, "the account name", and then count how many times that name comes up over each months sheet. I was also wondering if I can then get the average over 12 months in the same formula. If not thats ok.
The problem I am having is that I keep getting an error #VALUE!. I had no problem with it looking at only one sheet, but when I do more than one it gives me an error. I think it is the was I am breaking up each sheet. I have tried to do it every way I can think of... ,;) Nothing seems to work.
View 4 Replies
View Related
Nov 16, 2008
I have a table like this:
Name (A).....Date-in (B)....Date-out (C)
Name1........27/12/2008....3/01/2009
Name2........25/11/2008....28/11/2008
...
I want to count the rows (in the entire table) that B and C dates intersect with a reference dates (say J1 and J2).
It is a booking table so I want to know if the apartment is available for the reference dates (i.e. no bookings for that days).
I tried first a simple double conditional to know if a date is inside two dates but it didn't work:
=SUMPRODUCT(--(B:B<J1),--(C:C>J1))
View 9 Replies
View Related
Mar 8, 2009
I have a workbook with alot of sheets, each sheet is identical in format. What I am trying to achive is a way of counting all the occurances of a name in a range of cells on all sheets.
To try and explain, each sheet has a drop down list in cells C5:V5, and I need to try and get a way of a summary sheet showing how many times "J.Bloggs" appears in All Sheets accorss the range C5:V5, but am finding it impossible.
View 5 Replies
View Related
Mar 19, 2009
I am trying to tally answers for a survey. Column A specifies one of 3 locations (Boulder, Larimer, Westminster) and column C specifies a grade for services between locations (Not Uniform, Slightly Uniform, Very Uniform). I was able to tally each separately using 'COUNTIF' and the conditions, but now I would like a total for each of the grades by location, i.e. a count of people answering both Boulder and Uniform, etc.
View 5 Replies
View Related
Apr 14, 2009
In my Sheet "List" I have list of persons working on different projects.
I prepared graph after putting conditions on Project Type, Project Size, Project Year & Position (PM Project Manger). Every thing was done a in a nice manner with the help of below formula.
PJ TYPE , PJSIZE, PJYEAR, POSITION are ranges names.
=SUMPRODUCT(--(PJTYPE=$A$2),--(PJSIZE=$A6),--(PJYEAR=B$4),--(POSITION="PM"))
But the problem was occured that in a year if a person work on small project more than once then he will be counted only once. But if he has worked in same year on Medium or Larage project then they will be counted separately. I tried to oversome the problem with the help of Pivot Table and put manually some legend P1, P2 & P3 against the person name if he is working on same type of project in same year. then count only P1 in my formula to count how many Project Manager worked on Project. like
=SUMPRODUCT(--(PJTYPE=$A$2),--(PJSIZE=$A6),--(PJYEAR=B$4),--(POSITION="PM"),--(PMCOUNT="P1"))
Now i am trying that in a separate columm of # of PM there must be a formula which only put P or 1 for a person if he is working on same project in a year but i want that p or 1 only appear against his first entry i duplicate. for other persons it automatically enter 1 or p if they are appearing only once. i have tried a lot while using countif with multiple conditions but all in vain.
View 3 Replies
View Related
Jan 9, 2010
i want to use Countif() when 3 ceritera are true
ceritera
--------
1) Branch Name
2) Status
3) Login Date
can this be done by any mean
View 14 Replies
View Related
Feb 12, 2010
what I'm trying to do is to make a logbook for a machining center. Each part has an op10 and an op20, essentially front and back. And each part number falls into the category of OS or FS. I've used AND logic to make tables in hidden columns to be used by a countif statement to determine my totals. I.e. to determine if a scroll is completed, op20 has a a value of 1 AND column C is "OS".
I use
=IF(AND(A9=1;C9="OS");1;" ")
Then I countif criteria is 1 in the column i created with that statement.
That works just fine. Now what I want to do is to be able to create daily totals of OS and FS by simply modifying a variable date in a formula. So I'd like to essentially say: Countif Column C =OS and Corresponding column D = 1, and corresponding Shift date = 10.02.12(date to be variable). I'm at a wall here. Is there any way to do this somewhat simply?
View 5 Replies
View Related
Nov 11, 2007
I have 50 worksheets with shirt sizes. I am trying to count the number of instances that we have "XL".
So I use the formula:
=COUNTIF(worksheet1!A1:worksheet50!A1, "XL")
I also tried:
=COUNTIF(worksheet1!A1, "XL")+COUNTIF(Worksheet2!A1, "XL")+COUNTIF(worksheet3!A1, "XL")...etc
Niether work, in fact, excel decides just to leave the function as written above in the cell when I enter out of it or go to another cell. Sometimes it works if I "COUNTIF" multiple cells in one worksheet but will leave the formula as is if I try to manipilate it.
View 9 Replies
View Related
Oct 9, 2008
I'm trying to count multiple criteria from a second page in a work book, all the formulas i've looked up and tried do not seem to work... here's the formulas i've tried. DKOBULAR is the name of the 2nd page. D is the column used for the different resolves.
=COUNTIF(DKOBULAR!D:D="resolveA")+COUNTIF(DKOBULAR!D:D="resolveB")+COUNTIF(DKOBULAR!D:D="resolveC")+ COUNTIF(DKOBULAR!D:D="resolveD")
=COUNT(IF(DKOBULAR!D:D="resolveA",IF(DKOBULAR!D:D="resolveB",IF(DKOBULAR!D:D="resolveC",IF(DKOBULAR! D:D="resolveD")))))
View 3 Replies
View Related
Jan 20, 2010
Countif: Is there a way to have a single criteria (a persons name) and multiple ranges example: a6:a10 c6:c10 and recieve the sum of that criteria and ranges?? I know there is I just cant get it.
I need to count a persons name entered in multiple ranges (cells or areas) on the same worksheet. I cannot make one big range because i will need to do the same for the b6:b10 but for a different "need" the a colum and c colum bieng "completed" the b colum bieng "not completed". I have tried =countif(a6:a10 + c6:c10, cell_with _persons_name) and for obvious reasons that wont work,
View 5 Replies
View Related
Mar 26, 2014
I currently have a workbook with multiple sheets and would like to use countif in order to get the information I need.
this formula:
=SUMPRODUCT(COUNTIF(INDIRECT("Sheet"&{1,2,3,4,5}&"!C3"),"T4"))
works however this workbook will be given to several people and the problem is that the sheet names will change. For example they will be working on several suppliers and will re-name Sheet 1, 2, 3 accordingly to the supplier name.
Is there any way that that i could still get this to work where the sheet names change?
View 1 Replies
View Related
Oct 30, 2007
Is it possible to do a countif formula using a range of sheets.
i.e. I have info on 6 sheets (same layout on each) and I want to do a countif "Internet" that's in column G in all the sheets.
Is it possible to count them all together?
View 9 Replies
View Related
Mar 26, 2008
looking to use =countif for an address file and want to filter out duplicates of last then first name.
col F has last name
col d with first name
I've tried using the Conditional Formatting funtion, but am not understanding how to incorporate multiple columns,
View 9 Replies
View Related
Nov 17, 2008
Is it possible to use multiple COUNTIF combined with AND formulas in a single cell?
The current cell equation is =COUNTIF(C14:C83,"Alpha Full")+COUNTIF(C14:C83,"Beta Full")+COUNTIF(C14:C83,"Final Full")
But I need to to only add those cells if another parameter, namely if another cell continas a certain month.
For example something like this =COUNTIF(C14:C83,"Alpha Full")AND(b14,"November")
View 9 Replies
View Related
May 19, 2009
In Excel 2003, I need a countif to check for 2 criteria: (1) the left function looking for the value "Territory" in column A and (2) value > 0 in column G. I only want to count the rows where both the criteria are met. I have tried different combinations of countif including "and" in the formula, but I cannot get it to work. What is the proper syntax?
View 9 Replies
View Related
Jun 6, 2009
When using the following:
=COUNTIF(F6:F200,"G")
I get what I want.
What I can't figure out is, I want to get the count of columns G, J, N, and R which has the criterior that I'm looking for, added together for a total.
And in reality, the rows do not go down that far, but they might, so I put 200 in there to be safe.
View 9 Replies
View Related
Oct 30, 2009
How to use COUNTIF when there are multiple criteria. For eg. I have 3 columns, and I want to count the # of employees in each row if all 3 criteria in columns C, D, and E hold true.
View 9 Replies
View Related
Aug 1, 2006
I'm after a formula (or a piece of quick code) to count how many times a value occurs in a range of sheets. I've tried COUNTIF, but it only seems to work for one sheet, not a range.
View 8 Replies
View Related
Aug 16, 2007
I need to create a formula which counts the number of times a username appears in column X based on a given value in Column Y. This data will not be static - will need to be refreshed regularly. Countif does not support multiple criteria - what is the best way to create this formula?
View 2 Replies
View Related
Feb 26, 2008
I'm trying to count the number of sheets that have the word, "Active" in the same cell on each sheet. Here's the formula I'm trying to use:
=COUNTIF(Sheet1:Sheet5!K5,"Active")
When I do this I get the value error.
I will have any number of sheets that say Inactive or Active and I want to have a "master sheet" that will tell me how many sheets say active and how many say inactive.
View 7 Replies
View Related
May 26, 2014
I need a formula to count cells E7:E500 that say "Submitted" but only if cells R7:R500 say "PPB".
My original formula below is counting all cells except for the ones that say "PPB"
=COUNT(IF(E7:E500="Submitted",IF(R7:R50="PPB",'E7:E500)))
View 3 Replies
View Related