Still working on the dashboard, you guys save me so much time - I've also been learning so much!
I have a formula which works for only the entries already in there, but it doesn't work if i try to extend from A2:A1000 (Simple INDEX, MODE, MATCH)
MY GOAL:
Show the most frequent location from column A
Keep counting new data entries in column A indefinitely (dynamic)
If two locations have the same frequency (and are both the most frequent), print one at random or print the highest one in the column (doesn't matter as long as it works)
CURRENT FORMULA
=INDEX(A2:A7,MODE(MATCH(A2:A7,A2:A7,0)))
DATA:
A
1 LOCATION
2 dallas
3 dallas
4 miami
5 LA
6 LA
7 atlanta
8
OUTPUT:
dallas
If I extend the scope beyond A7, the output is "#N/A"
Thanks.
I figured it out for anyone who is interested.
New formula (Press CTRL+SHIFT+ENTER)
=INDEX(A2:A995,MODE(IF((A2:A995<>"")*ISNA(MATCH(A2:A995,$A$1:$A1,0)),MATCH(A2:A995,A2:A995,0))))
Related
I am trying to modify an already existing Excel file for a client. Here is the deal. They have the following Excel sheet with these columns (the picture is a simplified version of course to make it clear to you):1
If a student has completed their Bachelor they get a 1 in the Bachelor Done column, if not they get a 0. Now what they want is to check if at least one person per city has completed their Bachelor and display this in a new table with two columns (First column with the city name and second column with a Note of Yes or No).
For example let's take Lisbon. It has 2 students, George and Helen. In this case George has not completed his bachelor yet (0) but Helen has (1). In that case, Lisbon qualifies and should get a Note of YES in the new table.
Is there any way to implement this in Excel via an IF or a VLOOKUP function? I tried, but my Excel knowledge is quite limited. They also do not want to change the format of the file, as lots of people are already working with this and they are familiar with. Best case scenario could probably be the addition of extra columns.
My question is if there is a way to find for every city the highest Bachelor Done number and based on that to have a Yes or No output. The numbers for Bachelor will always be 1 or 0. So if a city has 1 and 0, 1 should be taken and display yes. If there is a city with 3 people and only zeros, No should be displayed.
If you need any clarification, please let me know.
First copy and paste all your distinct City names into a column, then remove duplicates (data... remove duplicates). In my case, I did that in column F. Then in column G, input a formula such as this:
=IF(MAXIFS(C:C,A:A,F2) = 1, "YES", "NO")
Results:
Hey there Stackoverflow users!
So I'm trying to track mileage for the distance of drives to different addresses in different cities. I made an example table of what I'm trying to accomplish. Let's say we started with 100 km and drove to somewhere in CITY2 which let's say takes between 8-25 km (there and back) so we get "KM" 10. This gets added to our start and we get 110. Now the next "start" is 110 and we drive to CITY1 which is 26-45 km for example. Let's say that was 30, which gets added to the "Start" and you get "End" which goes down. And so on and so on.
Now, I could do the basic C2 =B2+D2 and B3 =C2, but I'm not 100% sure how to check if a cell contains a certain text (in this case, "CITY#"). And if it does contain a certain CITY#, then I need to have "KM" produce a random number between a range of numbers to then get added to "Start" to result in "End."
Also here are the ranges
CITY1 (26-45),
CITY2 (8-25),
CITY3 (45-60),
CITY4 (0). The E column was just a test for search.
Any help would be appreciated!
*EDIT: So I have =IF(ISNUMBER(SEARCH("CITY2",A2)),RANDBETWEEN(26,45)) but is there a more efficient way to check the other CITY# or do I just make one long SEARCH thing?
This should at least get you started, with the caveat that all your addresses must end in "comma-space-CityName", and there are no other instances of "comma-space".
Use RIGHT and FIND to extract the city name, and then VLOOKUP the name against a table with city name and range boundaries. Finally generate and random number between the range using RANDBETWEEN.
Formula in D2:
=RANDBETWEEN(VLOOKUP(RIGHT(A2,LEN(A2)-FIND(", ", A2)-1),$F$1:$H$5,2,0),VLOOKUP(RIGHT(A2,LEN(A2)-FIND(", ", A2)-1),$F$1:$H$5,3,0))
I am coding something for a yearly tournament I do. Scores need to be listed in 2 spots on the form, but I don't want to have to manually enter them in both spots to avoid mistakes.
Buffalo 1 Detroit 2
Carolina 4 Los Angeles 6
Chicago 2 Nashville 0
Colorado 3 New York 1
Is there a way to code another cell to find the value of "Buffalo" (for example) in either column A or C and return the value directly to the right (in column B or D). Because values listed above may switch around when I do the game schedule, I need the 2nd set of scores to be "smart" in that they can find "Buffalo" in either of those columns and give me the correct value.
I've been doing some trial and error using different functions and haven't been able to figure it out yet.
Thanks in advance for your help!
enter image description here
use SUMIF()
=SUMIF($A$1:$C$4,G2,$B$1:$D$4)
Note the same size but offset ranges.
I have a list of names with their direct supervisor that I am trying to expand upon by showing the employees the next few layers down that work for the list of names.
Column C of the linked image brings back results of 1-7 by matching the list of names in A to those in the column of 7 names. This shows that "HB" works for "SW" but that "SW" works for "ZJ," so "HB" is technically under "ZJ" too. What I am hoping to accomplish is to have a result similar to that shown below (or something that will show the employees under each supervisor). As shown below, in the data there are many names not being searched for but that are needing to be mapped to those that are being searched for. At the current count there are 1500 employee names with 7 of them being the ones searched out of a list of 143 supervisors that repeat for the employees.
Names to Look for: "Fictional names used for scenario"
Sam W. (SW) 1
Robert R. (RR) 2
Kegan G. (KG) 3
Isiah B. (IB) 4
Orville E. (OE) 5
Robert J. (RJ) 6
Zach J. (ZJ) 7
Column A Column B Column C Column D Column E
Superv. Employ.
HB PJ 7
SW HB 1 7
BE JR 2
HB IL 1 7
IL AP 1
BE WP 2
RR BE 2
KG JW 3
JW JH 3
ZJ SW 7
These results would then be used to create lists of employees under a certain person.
Things I'm not sure affects this would be how the name is constructed in the workbook. Example Sam W. is listed as Wilson, Sam in the workbook.
Of course if there is another way to achieve the final result that would be easier then I wouldn't mind an altered format to what I currently have. If anyone has an idea how to achieve this please respond. If there are any questions about more specific things in the workbook that I could supply that could help resolve this quicker also let me know for any future inquiries I may have. Thank you.
Well, if I understand what you're asking, you need to normalize your data. In this case, that means creating two tables linked by an employee code that you'll need to create.
Once you have these two tables, you can easily perform any query and summary report you need.
Giving a range that contains the 7 names and next to them 7 numbers the name AUarray then in C3 and copied down to suit:
=IFERROR(VLOOKUP(A3,LUarray,2,0),"")
and in D2 and copied down to suit:
=IFERROR(VLOOKUP(INDEX(A:A,MATCH(A3,B:B,0)),LUarray,2,0),"")
I think something similar (but maybe a lot longer!) would work for ColumnE but I don't have time for that at present.
`
I have a question about excel.
There is a sports tournament with multiple phases. And the results page looks something like this:
rank phase1 phase2
1 TOM ALBERT
2 MATT TOM
3 ROBIN MATT
The first place gets 5 points, second 3 and third 1 points.
So the summary I would like to get is like this
rank name phase1 phase2 total
1 TOM 5 3 8
2 ALBERT 0 5 5
3 MATT 3 1 4
4 ROBIN 1 0 1
I cant figure out how to generate it simply, so if I copy-paste the results from phase3 to somewhere in my excel sheet, the summary page would also update.
If you can support me with advice or just a working template, I would be thankful!
Thank you for your time!
I've done you a basic example below...just list all 50 players in the summary page and copy the formula down as it is - as per the question it only records a value for the top 3 places, hope this helps if not please let me know :)
Example file here
Assuming the structure you defined and that when you paste phase 3 it will have its header ("phase3") on the same row as the other results, you could have the following formula on your Table 2:
{=SUM(IF(IFERROR(MATCH($B2,INDIRECT("Sheet1!"&CHAR(64+MATCH(C$1,Sheet1!$1:$1,0))&":"&CHAR(64+MATCH(C$1,Sheet1!$1:$1,0))),0)-1,0)={1,2,3},{5,3,1},0))}
Note: entered as Array formula: CTRL + SHIFT + ENTER
Formula uses the Table 2 headers ("phase1","phase2", etc.) and the players names to find the results for each phase. It then uses the predefined arrays that determine points given per position. The final sum is to bring the result that are in array (other values in array are 0) into single value.
Total would sum results per player.
Under the rank cells you would place the following formula:
=RANK(F2,$F:$F)
Which would provide you the rank of each player (Column F containing the totals).
Note that this would not sort your rank automatically but you could easily do this with Sorting or Autofilter. Hope this helps. Cheers.