Count Two Arrays With Match Condition
Dec 25, 2012Build table with 2 matching condition.
View 6 RepliesBuild table with 2 matching condition.
View 6 RepliesI'm trying to create a template that will be able to return a sales persons call target based on the category they sell and the current level they are. It works when I only ask it to look for one or the other, but I'm getting stuck trying to make it use both. I've attached a small sample. My original equation is as follows
=INDEX($C$2:$Q$51,MATCH($B2,$A$2:$A$51,0),MATCH(G$1,$C$1:$Q$1,0))
and this works perfectly fine. The problem I've now got is I need to add in a second criteria for setting the row_num. I've tried the following but I get a ref error. =INDEX($C$2:$Q$51,AND(MATCH($B3,$A$2:$A$51,0),MATCH(D3,$B$2:$B$51,0),MATCH(G$1,Telesales!$C$1:$Q$1,0)))
My difficulty is this. I have 2 columns, A and B. A contains only 0's and 1's. B contains any number from 1 to 100. I want to count all the instances of any given number in Col B that are matched with a 1 in the corresponding cell in Col A.
View 6 Replies View RelatedI have a table which, when populated, gets huge. The example I am showing here is greatly simplified.
I need to be able to provide a summary report that shows a count of entries (rows) that meet either TWO or THREE criteria, and one of those criteria is date-based.
For the date-based option, I need two possibilities: 6 months ago, and 12 months ago.
In the attached example, then, I would need to see:
- How many entries were for Purchasing and were Complaints in the past 6 months? (answer should = 2)
- How many entries were for Shipping and were Complaints in the past 12 months (answer should = 2)
- How many entries were for Shipping and were Compliments in the past 12 months (answer should = 1)
And so forth.
Here's the rub. All of this can be done with array formulas, and an EDATE cell that calculates today's date -6 months, and one -12 months. The problem there is that there would be so many array formulas (I need to do a lot of permutations), plus utilizing the volatile TODAY(), that the sheet slows down DRAMATICALLY in calculation time.
Secondly, this is for a user that is not Excel savvy. So the solution not only should not slow the calculations down, or require them to set Excel to manual calculation, but it should also NOT use Pivot Tables. (Simple users are confused by pivot tables, sorry to say... and they are a heck of a thing to format nicely for the boss to look at.)
And, of course, we can't use VBA.... that will also confuse the client.
So I know the best answer lies in database functions. I just cannot figure it out.
I have 2 sheets recording feedback and summarising the overall percentages for each trainer.
My boss wants me to do this by month!?!?!
I have created a third sheet but I am not sure how to do the following:
Look up the trainer name
Look up the month
identify the percentages for each category
create an overall average of these percentages
So for example if Jon smith trained twice in JAN getting 100% and 50% in cat1, it would display 75% in the cat 1 cell and so on.
So I have one sheet that needs to pull data through to another sheet (which is a stats summary)
I have a drop down list containing 4 options all of which have to be counted separately on the stats summary sheet. However I only need them counted when a value is input in another cell in that row.
For example: I select option 1 from down down menu, but I only want this to be counted on the stats page when I enter a date in the "date" cell.
I am retrieving a CSV file from the net. In this file there are 'x' amount of row data and 7 columns. I only care about the values in the 7th column for each row. I also don't care about the entire first row. A graphical version would be represented something like this, with the values I want colored in orange:
|---,---,---,---,---,---,---|
|---,---,---,---,---,---,---|
|---,---,---,---,---,---,---|
|---,---,---,---,---,---,---|
|---,---,---,---,---,---,---|
|---,---,---,---,---,---,---|
|---,---,---,---,---,---,---|
.
. extending until the end of the data set
.
I've managed to dice this thing into a jagged array by first splitting it using vbLf as a delimiter, and therefore adding those to an array called Lines(). Then I split Lines() up using commas as the delimiter and threw those into a jagged array, let's call it Breadcrumbs()(). I want to throw all the values from Breadcrumbs(i)(6) into an array of its own. Here's my code so far:
Code:
Public Sub CSVparser(file As String)
Dim Lines As Variant
Dim j As Integer
Lines = Split(file, vbLf)
ReDim breadCrumbs(UBound(Lines)) As Variant
For i = 1 to UBound(Lines) - 1
breadCrumbs(i) = Split(Lines(i), ",")
Next i
End Sub
I need a macro to match the row values on condotion.
To match the Q column values with S column values.
If suppose i have data i lke this then,
Q| R |S
1|22 yes 22
2|33 no 38
3|35 no 42
4|38 no 45
5|42 no 50
6|45 no
7|50 no
then the output should be like
Q| R |S
1|22 yes 22
2|33 no
3|35 no
4|38 yes 38
5|42 yes 42
6|45 yes 45
7|50 yes 50
I have this formula =IF(EXACT($E3,N$2),$C3/$I3,"") This works
I now need to add another match condition to the formula using H3,J1 so it would be something like this =IF(EXACT($E3,N$2),(H3,J1),$C3/$I3,"")
But not working
If you open the attachment.. then you will see that Column A has all the names and Column B has it's Value.. likewise.. Column D has all the names and Column C has it's values...I'm trying to first match the names from Column A to Column D and then see if Column B matches to Column C..
View 8 Replies View RelatedI need to be able to count items if they match a condition in another column, as below
A B
1 Apple Red
2 Apple Green
3 Apple Red
4 Pear Green
5 Apple Red
6 Pear Green
7 Pear Red
8 Apple Red
How can I count how many Red Apples there are. The answer should be 4 but when I use countifs I can either count the no of apples in Col. A or the no of colour Red in Col. B.
I have tried every combination of if, vlookup, and count that I can but keep getting errors or single col. counting.
I wanted to extract the data from the sheets if it match condition.
In the sheet george, data is in the A9: AE500. in the B9:B500, there is date format (mm-yy).
In the H9:AD500, designed as checklist where update as "Y" if or nothing
I wanted to extract the data from this file to sheet Exctract if any of the cell in the H9:H500 not equal to "Y" and B9:B500 of sheet george is less than or equal to D2 of sheet Extract. in the sheet George, some row will be hidden, i wanted to bring the data from hidden rows also.
i am trying to do is match 2 columns data based on a condition ie i have data in column "b" of sheet called "balance" data is variable this column has unique indentifiers i want to look at another column and match the uniques identifiers in another sheet if the cell value in column "D" = "please investigate" otherwise do nothing, the (column f) it will be looking up too is in sheet called "hi- port" so if cell value in column "d" of sheet"balace"= "please investigate" match values that are same from colum "b" of sheet "balance" to that of column (f) sheet called "hi-port"
i would like to colour only entire row of sheet called "hi-port" when the data matches to other sheet ie from columns "f " too " b". colour can be any colour
igonre my ranges they are wrong just used as example
Sub start()
Dim oWs As Worksheet
Dim oRngCheck As Range
Dim oCl As Range
Dim cCola As Range
Dim cColb As Range
Dim rngIRd As Range
Dim rngACs As Range
Dim Match As Boolean
Set rngIRd = Range("a1", Range("a65536").End(xlUp)) 'define the rang
Set rngACs = Range("b1", Range("a65536").End(xlUp)) 'define the rang
Set oWs = Worksheets("balance") 'change to suit
'starts at b2 to llow for header row.......................
I am trying to do the following....I have data in three column in the "historydata" sheet, A, B, C. A lists the dates, B lists categories, and C lists some data. The data in column C is defined by the date and category in column A and B. What I want to do is...I want to copy data in C to the next empty cell in another spreadsheet if it meets the date and category condition. (for instance, if (y,A)=9/17/2007 and (y, B) = bond A, then I want to copy (y,c) to the next empty cell in sheet "marginreq" based on the first column. Here is my code...but it doesn't work.
Sub OJOM()
Dim A As Integer
A = 2
Do While Worksheets("Historydata").Cells(A, 1) <> ""
If Worksheets("Historydata").Cells(A, 2).Value = Worksheets("MarginReq").Range("B5") And Worksheets("Historydata").Cells(A, 3).Value = Worksheets("MarginReq").Range("B7") Then
Application. ScreenUpdating = False
Worksheets("Historydata").Cells(A, 3). CurrentRegion.copy Sheets("MarginReq").cells(rows,count,1).End(xlUp).Offset(1,0)
Sheets("Historydata").Select
Application.CutCopyMode = False
Application.ScreenUpdating = True
End If
Loop
End Sub
HOw can I match combination columns of A-F (row1) to combination H-M (rows1 to end) and show how
many are number matched in column N..
ex..
Rows
A
B
C
D
E
F
G
H
I
J
K
L
M
N
1
2
3
16
17
11
9
11
17
18
I have a column with different cities that customers visit (Barcelona, Lisbon etc) and another column with their booking requirements (All inclusive, breakfast only etc)
I'd like to set up a count on the total number of customers who are going to Barcelona and having all inclusive.
I've tried using nested if statements with vlookups and a countif but can't seem to get that working.
I need a unique count of the ID number. What I need is to check and see if the row has a number in it and if it is greater than 0 and is not blank. If the row has 0 in it, then that is not counted in the count. For in stance .....
View 9 Replies View Relatedi've got a list of values that need summing, but only if i certain value is in another cell:
a b
1 paid
1 paid
1 not
1 paid
1 not
i need a formula that will count all the values in column a only if column b is set to "paid"
I need to calculate the lookup value that have more than one...
I want to hav a simple analysis on likert scale
I hav students from 3 (or more) institute (A,B,C). 3 survey questions...
How to calculate how many students form each institute that score 1/2/3/4/5 (base on the likert scale, maybe up to 10) for every single question (in my sample worksheet, i named it as Item1, Item2, Item3 as a sample questionaire)
Can someone please help me with formulas to calculate the # of Unique Customers, #of Items, and Amount for Q1, Q2, Q3 and Q4 for the year in A2 (which contains a drop-down list).
Please see attached sample workbook. (I can’t figure out how to combine the formulas for count unique items with a specific quarter.)
I need a formula that will return a total for the number of cases that have been closed within 6 months. Also I need a percentage total for number of cases that have been closed within 6 months. So the conditions are that the case has been closed and within 6 months.
I tried to use a IF formula that returned a 1 if within 6 months and a 0 if outside 6 months and then just SUM() the column, however for some reason that just returns 0. I am using Excel2003
I have a formula that tests the minimum time in a column. If the time is the minimum it gets a PB (Personal Best) notation. My problem is once a season there is a competion that needs to be recorded on the worksheet however I do not want this time for this competion counted in the MIN test or to get a PB allocated. I have worked out how to ignore the PB but I cannot get the MIN test to work properly. Dates of comp are in Col B, data (times) in Col C and formula for PB's in Col D. When a cell in Col B (Dates of comp) = Region I want the MIN test to ignore the value in the adjacent cell in Col C.
View 14 Replies View Relatedproblem is in the same vain as my last thread "Formula to count MIN with condition". In the attached worksheet samples, Col B has competition dates, Col C is time/distance data, Col C (filled down) is the formula that recogises if the time/distance is a PB.
Once a season there is an event "REGION" where I want the formula to ignore the data in Col C adjacent to "REGION". The date of REGION changes every year and could be anywhere in Col B. The first attachment is what the sheet currently looks like and the second is what I want it to record, specifically D11. Even though D10 is a better distance, it would be ignored as it is REGION.
I have data like
col A col B col C col D
DLM2.2 kWDLM75 kWDLM55 kWDLM160 kWDLM11 kWDLM1.5 kWRDLM110 kWRDLM2.2 kWRDLM11 kWRDLM55 kWDLM11 kWDLM30 kWDLM45 kWDLM1.5 kWUS40 kVAUS10 kVAFD45 kVAFD45 kVAFD6.4 kVAFD25 kVAFD45 kVAFD11 kVAFD11 kVAFD150 kVAFD10 kVAFD18.5 kVAFD25 kVAFD18.5 kVA
The problem is col B having M type and col C contain their respective ratings. I want summary report.
Rating 2.2 should give me total count, but if you see there are types.
In col A -
DL
RDL
blank cells
so, 2.2 DL = the perticular count
2.2 RDL = the perticular count
Only M type having subtype DL and RDL.
Im col B, there another subtype also like US or FD. For that also particular rating show their exact count.
Is that possible? I want excel formula not vba code.
I've an excel sheet with 1000 rows data. I need a formula to count number of unique items in a column with a condition. Please find a sample data sheet.
I've tracking list that has ordered and delivered items for a given month on weekliy basis such as Week1(W1), Week2(W2), etc. I need a formula to count number of unique item delivered on this month.
Item 1 to item 8 delivered and item 10 also delivered in week 4, So totally I need to get the result as 9.
I was trying to use "countif" for validating and counting each row, it's throwing value! Error =1/(COUNTIFS(A:A,A2, c2:c23, ""&0)) i.e., = 1/countifs(unique items from column A, then nonblank cells in column C) but it's giving Value error..
I just need to count the unique item with another condition.
Item details
Order week
Delivered Week
Item 1
W1
W1
Item 2
W1
W1
[code]....
1. Count of Unique Print Customers
2.Total of Print Revenue
3.Count of Unique Online Customers
4.Total of Online Revenue
5.Count of Customers advertising in both Print and Online
6.Total Online and Print Revenue
I have a spreadsheet with employees performance results for the last 12 months. Column A contains name, columns B to M contain text "Gold", "silver" or "bronze". I need to count how many consecutive months thay have achieved "Gold" status BUT must include latest month.
So, if column M contains "silver" or "bronze", the consecutive answer (column N) would be 0. If col M = "Gold" but L doesn't then N = 1. If M and L = "Gold" then N = 2 etc etc.
Is there a formula I can use in column N for this without doing 12 "if" functions?
I think this needs to be an array formula but the ones I've tried I can't get to work.
I have a spreadsheet which looks like this: http://img46.imagevenue.com/img.php?..._122_521lo.JPG
I'm trying to figure out how to set up a macro which can generate a correlation table for each row. For instance, I would like for the macro to cycle through the row labeled 'List1' and record each cell value (B1, C1, D1, etc). Then, I would like to compare those values to the row labeled 'List2' to determine how closely they correlate. If List1's columns were identical to List2's columns, (order does not matter), I would want those two to have a correlation of 1 or 100%. If none of those two lists' columns match, I would want a correlation of 0 or 0%. In the end, I would like to only keep the List rows which are most uncorrelated with each other.
the report I'm creating has rows of refreshable data with a header and I need to find a way to count number the rows where a "yes" value appears in column J, then paste that total number into another new sheet in cell E9. I saw it on here a few days ago, but didn't mark it
View 4 Replies View RelatedI have cells in a column, which contains text and numbers. I want to count the number of cells that have value greater than zero.
I tried using DCOUNT, but I got no idea why is its not working
=DCOUNT(I15:I114,1,J5)
where the values are form I15 to I114.. and J5 contains the condition >0
Also, while I am at it.. Is there a straightforward way in excel to get the count of the max run of cells with values greater than zero.
for e.g if cells from 18 to 30 have values greater than zero , and cells 44 to 50 have values greater than zero. then I want it to return 13. i.e (30-18)
I am hoping that there is a simpler way than looping through the column in VBA