Unsure which function would work in Excel (IF-THEN, VLOOKUP, etc) - excel

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.

Related

Find a value depending on first, what type of event it is, second, what group is playing and, finally, where it is between two dates. Excel attached

I created a dataset to illustrate what I need help with. Its made up data so please pardon the strangeness.
I am trying to get a value from Col E "RESULT" and get it into Col K "Result", based on data like:
Tennis 1 01/01/2020
Tennis 2 04/01/2021
Basketball 2 25/05/2018
Squash 2 11/09/2019
Football 1 18/02/2016
The sport can vary so, that's the first variable;
The group that plays can vary so, that's the second variable. (I've only used 2 groups to make the dataset easier to create but assume there could be up to 6 or 7 groups playing);
Finally, the third variable, there's the date which falls between a start date and an end date (Col C and D).
I could use the lookup function to find where a date fits between two other dates but when you have 2 variables before hand, I have no idea how to deal with that.
BTW, just a final comment incase anyone asks, I don't know how to use VBA yet :/
Can anyone please help?

How do I build an Excel function to find duplicates in a column, based on other criteria in other columns?

Basically I'm trying to figure out if the Client column repeats, but based on the following criteria.
Dates have to be different
Product is the same
Ticker is the same
Clients are obviously the same as well
Dates
Product
Ticker
CLient
Yes?
13-June
Computer
XYZ
Greg
Y
14-June
Computer
XYZ
Greg
Y
14-June
Computer
XYZ
Sally
15-June
Computer
ABC
Sally
Y
16-June
Rocket
ABC
Sally
17-June
Computer
ABC
Sally
Y
Ideally, the Yes? column should contain my formula. I think I'm halfway there using counties,but I keep running into problems with the product bit.
Thanks everyone.
If you have the newest version of Excel, you can use FILTER.
For example:
=IF(COUNTA(UNIQUE(
FILTER($I$1:$L$6, $J$1:$J$6&$K$1:$K$6&$L$1:$L$6=J1&K1&L1)))>COUNTA(I1:L1),
"Y","")
if you will not use the "Y" result elsewhere in your file, I mean, if your aim is just to spot the duplicate values; just concat the fields Product, Ticker and Client in another column and apply conditional formatting to highlight duplicate values.

How to choose the highest number from a set of same names?

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:

Most frequent text in column dynamically

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))))

Excel: Matching 1500 names (Column A) with Supervisors (Column B) and placing Identifier in Corresponding Column C,D,E,etc

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.
`

Resources