I'm looking to find a way to group/sort data based on a 2 serial numbers, in this case called Demand Number and Supply Number.
The logic I'm trying to apply is if an items supply number matches the demand number of another item then it should be shown underneath it for example if you were to sort the data shown below:
You would get the following result:
I think I will need to use some helper columns, to apply 'levels' to the items but I'm really not sure where to go.
Thanks for the help!!
Note if there is not way to achieve the sort as shown above, this sort would also be suitable:
Here is the data as text:
Item ID Demand Number Supply Number
Nut 10 1005 10055
Nut 10 10056 10087
Nut 10 1005 100585
Washer 40 10056 10095
Washer 40 1005 154899
Suspension 9 1001 1005
Engine 15 1001 10056
Car 66 18996 1001
Related
I'm trying to compile a best 5 and worst 5 list. I have two rows, column B with the number score and column C with the name. I only want the list to include the name.
In my previous attempts the formula would get the top/bottom 5 but as soon as a duplicate score appeared the first known name with that value would just repeat.
Here is my data
26 Cal
55 John
55 Mike
100 Steve
26 Thomas
100 Jaden
100 Jack
95 Josh
87 Cole
75 Brett
I've managed to get the bottom 5 list formula correct. This formula works perfectly and includes all names of duplicate scores.
Example of what I get:
Cal
Thomas
John
Mike
Brett
=INDEX($C$56:$E$70,SMALL(IF($B$56:$B$70=SMALL($B$56:$B$70,ROWS(E$2:E2)),ROW($B$56:$B$70)-ROW($B$56)+1),SUM(IF($B$56:$B$70=SMALL($B$56:$B$70,
ROWS(E$2:E2)),1,0))-SUM(IF($B$56:$B$70<=SMALL($B$56:$B$70,ROWS(E$2:E2)),1,0))+ROWS(E$2:E2)))
Here is the formula I've tried to get the top 5 - however I keep getting an error.
=INDEX($C$56:$E$70,LARGE(IF($B$56:$B$70=LARGE($B$56:$B$70,ROWS(E$2:E2)),ROW($B$56:$B$70)-ROW($B$56)+1),SUM(IF($B$56:$B$70=LARGE($B$56:$B$70,
ROWS(E$2:E2)),1,0))-SUM(IF($B$56:$B$70<=LARGE($B$56:$B$70,ROWS(E$2:E2)),1,0))+ROWS(E$2:E2)))
Example of what I'm looking for
Steve
Jaden
Jack
Josh
Cole
You can set two queries like this for both cases:
=QUERY(B56:C70,"Select C order by B desc limit 5")
=QUERY(B56:C70,"Select C order by B limit 5")
Use SORTN() function like-
=SORTN(A1:B10,5,,1,1)
To keep only one column, wrap the SORTN() function with INDEX() and specify column number. Try-
=INDEX(SORTN(A1:B10,5,,1,1),,2)
I am looking for some help trying to create an excel macro. I have a very large sheet that look a bit like this:
Account NAME Address Dealer
68687 Sara 11 Wood 1111
68687 Sara 11 Wood 1111
68687 Sara 11 Wood 1111
12345 Tom 10 Main 7878
12345 Tom 10 Main 7878
54321 Tom 10 Main 7878
10101 John 25 Lake 3232
10101 25 Lake 3232
11111 John 25 Lake 3232
What I need to do is to highlight all the rows on the sheet where each Dealer has more than one unique value in the Account column, but it must also have some value in the name column.
So in the above example I would only want to highlight all the rows for dealer 7878.
I am not certain if I should look at loops or arrays, they might take a long time as the sheet is quite large.
Looking for some help.
Thanks.
James - Dirk gave you a good answer in his comment. It looks like this ...
The format formula is also put into Column F, so you can see the results of the calculation.
If you feel you should still have a VBA solution, this gives you a good starting point for how to layout your code ...
Ignore rows with empty name
Count rows where the dealer is the same as the dealer in the current row, and the account is NOT the same as the account in the current row
If the count found in Step 2 is greater than 0, highlight the current row.
I have two Excel spreadsheets. One contains average numerical grade for a student and the other a list of letter grades for numeric grades between a min and max
Spreadsheet 1
Student Avg Letter Grade
Mike 91
Joe 76
Mary 84
Sally 78
Spreadsheet 2
Min Max LetterGrade
90 100 A
81 89 B
71 80 C
61 70 D
0 60 F
How do I return the proper grade for each student in Tableau? It seems trivial but I can't figure out the calculation. Thank you for your help!!!
There is an easier way to do this by using Groups.
Import Spreadsheet 1 as a data source
Right Click on "Avg" and select Create Group
From there use Shift Click to group your ranges using Spreadsheet 2 as your reference, using labels "A, B, C"
On the top of the Create Group dialog box, make sure you rename your Field Name as "Letter Grade"
The weakness of this approach is that you have to check/redefine your groups if you are updating your data source. Using IF-ELSEIF statements may be more flexible as Inox suggested in the comments. But this is a relatively easy trick, without any programming involved. :-)
For more info, visit: http://kb.tableau.com/articles/knowledgebase/use-ad-hoc-groups-categorize
Hope this helps!
I have a range of articles;
Product Width height
6995851 2200 1500
6907240 2500 1500
6992008 2700 1500
6961925 2700 1500
6924509 3000 1500
6982492 3000 2000
And I have a number of models;
Product Width height Extra room Fits
9PARX 2470 1530 50
WGTQB 2970 1530 50
R3FEA 2970 1530 50
O03TU 2970 1530 50
7BUIT 3170 1530 50
H7XSB 3170 1530 50
NF75G 2970 1770 50
6X9EG 3470 1770 50
9Q9WJ 3470 1770 50
19UQR 4000 2100 50
FCQDM 3470 1770 50
I want the "Fits" in my number of models to tell me, with the added extra room, what article that is greater than that that will fit. Ie, Product "9PARX" would be a total of 2470+50=2820 wide and 1530+50=1580 tall, that means in tallness they all but "6982492" is valid, and in wideness "6992008" and "6961925" would be the ones that fit. Thus, in fits for "9PARX" the result will be "6992008" and, most desired in a second column, "6961925". Is it possible to make this with a formula? That way I can easily import [x] amount of models and update articles as time passes by and really easy know what fits best where.
Well, this can be done using Array formula, but it will be really slow.
Given that your second table (table with Extra Rooms) column Product starts in Column G and we start from row 2, then you can use the following formula:
=INDEX(A:C;MATCH(1;(B:B=MAX(IF(B:B<(H2+J2);B:B;"")))*(C:C=MAX(IF(C:C<(I2+J2);C:C;"")));0);1)
Some explanations:
MAX(IF(B:B<(H2+J2);B:B;""))
The formula above Sums Width + Extra and then tries to find the Maximum number which is less than the result (so that your product still fits in the room)
Our Match formula:
MATCH(1;(B:B=MAX(IF(B:B<(H2+J2);B:B;"")))*(C:C=MAX(IF(C:C<(I2+J2);C:C;"")));0)
This is multiple criteria Match function. We are looking for number 1 which is TRUE result for our Match criteria. Basically, we can have as many criterias here as we want where what we do is that we multiply results (either 1 for TRUE or 0 for FALSE) and if all conditions are TRUE then we have found our match).
Hope it helps!
Phone number Provider Duration (min)
1001 Fastcom 2
1002 Fastcom 1
1004 Mobilecom 4
1008 Telecom 5
1001 Fastcom 3
1001 Fastcom 2
1003 Telecom 3
1004 Mobilecom 2
1008 Telecom 6
1002 Fastcom 1
I want to use one formula to get the sum of the duration of calls whose service provider is the provider for the phone number 1001. I hope this revised version is clearer than the previous one. Again, thanks to all who paid attention.
There are 14 rows. Column A contains numbers from 1 to 14. Column B contains Names of people(maybe repeated). Column C contains their preferred seasons (possible more than 1) and Column D contains how many days they do sports in that partucular season. I need one formula to get how many days are spent doing sports in the season(s) that is (are) preferred by Adam, which actually are Spring and Fall
Assuming data in rows 2 to 15 try this array formula
=SUM(IF(ISNUMBER(MATCH(C2:C15,IF(B2:B15="Adam",C2:C15),0)),D2:D15))
confirmed with CTRL+SHIFT+ENTER
In one formula I'm not sure. Personally I'd have a formula in each row of column E that is 0 or the value from D, then you can sum(e:e) instead.