If Cell Contains XXX Then Return Corresponding Value - excel

A B C D
1 Ross Sales John Guys Finance
2 Smith Sales Sam Andy #N/A or False
3 Guys Finance Mike Ross Sales
I'm putting this formula in cell "D1" but it's not giving me correct result
=IF(SUMPRODUCT(--ISNUMBER(SEARCH(A:A,C:C)))>0,B:B)
INDEX MATCH function would not work because it's not exact value
What can I put in "D1" and down to give me result as in the table above?

Try this in D2,
=LOOKUP(1E+99, SEARCH(A2, C:C), B:B)
'or cut down the full column references
=LOOKUP(1E+99, SEARCH(A2, C$2:C$4), B$2:B$4)
'alternately as a wildcard MATCH
=INDEX(B:B, MATCH("*"&A2&"*",C:C, 0))
Fill down as necessary.
      

Related

Returning Min date based on criteria ignoring blank dates

I'm trying to return the Min date based on criteria.
A
B
C
D
E
F
Frank
01/01/2014
Susan
Susan
01/01/2018
Min
08/01/2010
Susan
12/01/2021
Max
12/01/2021
Susan
Susan
08/01/2010
The following formula works fine in cell F2 as long as there are no blanks in the date column B. If there are any blanks it returns 01/0/1900
=MIN(IF(A:A=E1,B:B))
I found this solution that ignores blanks but returns the Min date from the entire column, not based on any criteria.
=MIN(IF(B:B=0,"",B:B))
Thank you for the lucid and easily reproducible question. This should do the trick for you:
=MINIFS(B:B, A:A, E1, B:B, "<>")
It ensures that empty date cells corresponding to the given name are not considered.

Ranking Duplicate String Values in Excel

I have a spreadsheet with string values and need to create a column with the rank (without using the rank function) of the duplicate values from another column.
Please see below for example of the desired outcome where Dupe_Rank is the created column.
Thanks!
Name
Dupe_Rank
John
1
John
2
Dave
1
John
3
Bill
1
Dave
2
let's say "Name" starts from column 'A' and row 2 as in below figure:
then add this formula:
=COUNTIF(A$2:A2,A2)
to cells below Dupe_Rank and then drag(or copy-paste) this formula to all the cells

How to compare two excel sheets list?

I have two sheets list both has the same data which is first name and last name. I want to know if list A has the same last name, and the first 3 character from first name from list B. I tried to use Vlookup function but I did not work. I want to match exact last name and exact three character from first name.
An example:
Worksheet 1
A B
1 John Smith
2 Jane Jones
3 Robert West
Worksheet 2
A B C
1 John Smith MATCH
2 Jane Jones MATCH
3 Bob West NO MATCH
In cell C1 on Worksheet 2 enter this formula as an array formula:
=IF(NOT(ISNA(MATCH(CONCATENATE(LEFT(A1,3),B1),CONCATENATE(LEFT(Sheet1!$A$1:$A$3,3),Sheet1!$B$1:$B$3),0))),"MATCH","NO MATCH")
Drag your formula down to include cells C2 and C3.
Notes
To enter as an array formula use CTRL + SHIFT + ENTER
Update the Left formula to match different numbers of characters in first name

VLOOKUP to check if a value exists in a cell

I have data like this in a column:
John L. Doe
Jane N. Doe
Michael A. Doe
I'm trying to match the entries against another column with this format.
doe, jane
doe, john
doe, michael
I've tried VLOOKUP's for the lastname and using wildcards:
VLOOKUP("*" & A1 & "*",B:B,2, FALSE)
but I'm getting #N/A as a result.
If your columns are labelled, then in C2 and copied down to suit:
=MATCH(TEXT(MID(B2,FIND(" ",B2)+1,LEN(B2))&"*"&LEFT(B2,FIND(",",B2)-1),"#"),A:A,0)
should return the row number of a match in ColumnA for the value in ColumnB that is in the same row as the formula result.
To match "the other way around" is very similar, and as it happens for the example the results the same:
=MATCH(TEXT(MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,LEN(A2))&"*"&LEFT(A2,FIND(" ",A2)-1),"#"),B:B,0)

Count the cells that value in excel

I want to get the count of cells in each row that has a value in it.
ross dan bernard 3
mary 2
rose johnny 2
I want a formula that gives counts the non blank values in each row and gives the value in column E (ie., 3,2,2)
You can use the CountA function:
=COUNTA(A1:Z1)

Resources