I have an array with a number of columns but am looking to count based on two columns in particular. I'm looking to have a function that will count how many blank products (column C) are in production (Column B). See image below, the desired output here would be 2 (111 and 333 are in production. 111 appears twice but should be counted only once).
Case Example Image
I'm sure there is a better way to do this, but this will get the job done.
=COUNT(UNIQUE(C1:C4*--(B1:B4="In Production")))-1
Related
I did not see something like this in other questions/ forums so hopefully it can be done.
Need to know if values from one table are in another, checking to see if there is a match.
Table 1 in Sheet 1 is used to record "Incoming" data of Part Number and Lot Number.
Table 2 in Sheet 2 is used to record when record is "Outgoing".
Column A is Part Number, B is Lot number in both Sheets. Part number can repeat, but Lot # will not. Trying to find a way to return a Yes/ No or 1,0 if part number and lot number in Sheet 1 exists in Sheet 2 in Column C of Sheet1. I have attached a Snippet example what I am trying to do. This will help me generate info on if an Incoming record has been completed and left (Outgoing). I do not believe vlookup will work and have tried some different permutations of match. Open for other options. Thanks!!
Edit: Lot # does have to ablity to repeat (not often) but with a different corresponding Part Number. Need to know if there is a match with both Lot# and Part Number as in the Incoming record.
Use:
=--(COUNTIFS(Sheet2!A:A,A2,Sheet2!B:B,B2)>0)
If there are matches it will return 1 if not 0
I read through some of the other tie breaker-related threads but didn't seem to find this exact solution...
The old tie-breaker question again.
In column A are the point values from a psychology test, with the related need listed in column B.
I found a formula to list the values in order from highest to lowest in column C.
I am looking for way to then list the needs according to the score from highest to lowest (Column D), because then I have a formula that I am running based on the top 2 results. There is a tie between 2 of them but I need to list the results for each out separately.
I have tried a few different formulas but none have quite worked.
Screenshot
For the first:
=INDEX($B:$B,AGGREGATE(15,6,ROW($A$2:$A$7)/($A$2:$A$7 = LARGE($A:$A,1)),1))
For the second:
=INDEX($B:$B,AGGREGATE(15,6,ROW($A$2:$A$7)/($A$2:$A$7 = LARGE($A:$A,2)),COUNTIF($C$2:$C3,LARGE($A:$A,2))))
To get the list in Column D:
=INDEX($B:$B,AGGREGATE(15,6,ROW($B$2:$B$7)/($A$2:$A$7=C2),COUNTIF($C$2:C2,C2)))
I have a data entry like thisData entries
Now, i need to find the smallest 10 values and also get the corresponding person and area and date along with it.
I used SMALL functoin to find the least 10 values. Then I used the index and match functions for getting their corresponding row entries. The problem is since some data entries are being repetitive, these functions are giving the row of the first 2 for all the remaining 2s. How to solve this
In F2 use Rank like this, so you have unique numbers:
=RANK(C2,$C$2:$C$21,1)+ROW()/1000
in G2 use Small, to pull the smallest of the ranked numbers and copy down 10 rows.
=SMALL($F$2:$F$21,ROW(A1))
Now you can pull person, date, real hours and area with an index match in H2, copied across and down.
=INDEX(A$2:A$21,MATCH($G2,$F$2:$F$21,0))
I have a table that I want to find the top X people in each of the different groups.
Unique Names Number Group
a 30 1
b 4 2
c 19 3
d 40 2
e 1 1
f 9 2
g 15 3
I've ranked the top 5 people by number by using =index($A$2:$A$8,match(large($B$2:$B$8,1),$B$2:$B$8,0)). The 1 in the LARGE function I linked to a ranked range so that when I dragged down it changed up the number.
What I would like to do next is rank the top x number of people in each group. So top 3 in group 1.
I tried =index($A$2:$A$8,match("1"&large($B$2:$B$8,1),$C$2:$C$8&$B$2:$B$8,0)) but it didn't seem to work.
Thanks
EDIT: After looking at the answers below I have realised why they are not working for me. My actual data that I want to use the formula with have multiple entries of numbers. I have adjusted the example data to show this. The problem I have is that if there are duplicate numbers then it returns both of the names even if one is not in the group.
Unique Names Number Group
a 30 1
b 30 2
c 19 3
d 40 2
e 1 1
f 30 2
g 15 3
Proof of Concept
Use the following formula in the example above in cell F2 and copy down and to the right as needed.
=IFERROR(INDEX($A$2:$A$8,MATCH(AGGREGATE(14,6,($C$2:$C$8=F$1)*($B$2:$B$8),ROW($A2)-1),$B$2:$B$8,0)),"")
In the header row provide the group numbers. or come up with a formula to augment and reset the group number as you copy down based on your X number in your question.
Explanation:
The AGGREGATE function unlike the large function is an array function without the need to use CSE. As such we can add criteria to what we want to use. In this case only 1 criteria was used and that was the group number. in the formula it was the following part:
($C$2:$C$8=F$1)
If there were multiple criteria we would use either an + operator as an OR or we would use an * operator as an AND.
The 6 option in the aggregate function allows us to ignore errors. This is useful when trying to get the small. It is also useful for dealing with other information that may cause errors that do not need to be worried about.
As this is technically an array operation avoid using full column/row references as they can bog down your system.
The basics of what the over all formula is doing is building a list that match the group number you are interested in. After filtering your numbers, it then determines which is the largest, second largest etc by what row you have copied down to. It then determine what row the nth largest number occurs in through the match function, and finally it returns to the corresponding name to that row with the index function.
Building on all the other great answers.
Because you have the possibilities of duplicate values in each group we need to do this with two formulas.
First we need to get the numbers in order. I used the Aggregate, but this could be done with the array LARGE(IF()) also:
=IFERROR(AGGREGATE(14,6,$B$2:$B$8/($C$2:$C$8=E$1),ROW(1:1)),"")
Then using that number and order we can reference, we can use a modified version of #ForwardEd's formula, using COUNTIF() to ensure we get the correct name in return.
=IFERROR(INDEX($A$2:$A$8,AGGREGATE(15,6,(ROW($B$2:$B$8)-ROW($B$2)+1)/(($C$2:$C$8=F$1)*($B$2:$B$8=E3)),COUNTIF(E$2:E2,E3)+1)),"")
This will count the number in the results returned and then bring in the correct name.
You could also solve this with array formulas - to filter a group whose name is stored in E1, your code
=INDEX($A$2:$A$8,MATCH(LARGE($B$2:$B$8,1),$B$2:$B$8,0))
would then be adapted to
=INDEX($A$2:$A$8,MATCH(LARGE(IF($C$2:$C$8<>E1,-1,$B$2:$B$8),1),$B$2:$B$8,0))
Note: After entering an array formula, you have press CTRL+SHIFT+ENTER.
Thank you to everyone who offered help but for some reason none of your methods worked for me, which I am sure was to do with the quality of my data. I used an alternate method in the end which is slightly convoluted but seemed to work.
=IF($C2="1",RANK($B2,$B$2:$B$8,1)+ROW()/10000,-1)
Essentially using the rank function and adding a fraction to separate out duplicate values.
I have an Excel spreadsheet containing a number of columns most important of which are called "sequence", "modifications" and "signal". Column called "sequence" contains a number of entries, which repeat itself as long as there is different "modification". Each particular sequence with given "modification" assigned certain "signal" value.
Sequence Modification Signal
ABCDEF None 100
ABCDEF Carba 200
ABCDEF NEIAA 300
ABCDEF NEIAA,Carba 400
ABCDEFG None 400
ABCDEFG Carba 600
ABCDEFG NEIAA 700
ABCDEFG NEIAA, Carba 800
ABCDEFG 2XNEIAA 900
The task which I am having problem with consist of clustering similar sequences with different modification together, getting a total sum of signal for this particular group , dividing signal from individual group components to the calculated sum for this particular sequence cluster, then grouping obtained percentage values to entries with and without NEIAA tag, summing values for all entries with NEIAA tag within the group and reporting it as a final "% MODIFICATION" value for this particular cluster.
For example Sequence "ABCDEF" have total signal of 1000 with 30% and 40% belonging to entries with NEIAA tag, thus total % Modification for this particular cluster is 70%. Similarly for sequence "ABCDEFG" total % MODIF is equal to 100*(700+800+900)/(400+600+700+800+900).
Both formula or VBA would work for me.
My sample data is as below:
with
SUMIFS(C:C,A:A,A2)
you can summ all (which you allready got)
and with
SUMIFS(C:C,A:A,A2,B:B,"*NEIAA*")
you can sum only the ones including NEIAA
put everything together (we want it only once at the first sequence but have it dragable) just put in F2
=IF(AND(COUNTIF($A$1:A1,A2)=0,LEN(A2)>0),SUMIFS(C:C,A:A,A2,B:B,"*NEIAA*")/SUMIFS(C:C,A:A,A2),"")
if you still have questions, just ask
COUNTIF($A$1:A1,A2)=0 just checks to have the value in column A the first time and LEN(A2)>0) just skips the the blank cells ;)
EDIT:
Assuming everything is shifted to the right and column A gains a unique Keyword, so each combination of column A and B is like it is now for only column A you can try this pls: (put in G2 and then auto-fill down as you need it)
=IF(AND(COUNTIFS($B$1:B1,B2,$A$1:A1,A2)=0,LEN(B2)>0),SUMIFS(D:D,B:B,B2,C:C,"*NEIAA*",A:A,A2)/SUMIFS(D:D,B:B,B2,A:A,A2),"")
as said:
- everything is shifted to the right (insert column in front of everything)
- column A now holds the "run" -> sum up everything having the same "run" AND "sequence" (and the "NEIAA"-part)
If you still have any questions, just ask :)