Complex Excel lookup with results - excel

Column A holds all the values that are used to find/search in entries within Column B.
For example... Excel will grab all the search data from column A, if it finds any of those entries anywhere in column B then it marks the cell where it found a match as Yes in column C.
Please note that in the example below A1 is (111) and B13 is (2211122). As (111) was found within that string then it has found what it is looking for and marked it as yes.

You can use folloiwng array formula:
=IF(SUM(IFERROR(FIND($A$1:$A$9,B1),0))>0,"Yes","No")
Just select C1 cell, enter this formula in formula bar, press CTRL+SHIFT+ENTER to evaluate it and then drag it down.
UPD:
If your substrings in column A has spaces in the beggining or in the end, you can use next function:
=IF(SUM(IFERROR(FIND(TRIM($A$1:$A$9),B1),0))>0,"Yes","No")

Related

filling excel column automatically where another column is not null

I want to fill an excel column with a specific value where another column in the same sheet is not null(I've used '-' for all the empty cells). Can I automate this?
For example, in the screenshot, where ever I have a value, I want to insert 'Hi' (Only at the places with a value) and omit where there is blank space represented by '-'. Also, it should not edit the values in B column if there is anything already present in it.
You can use if function to do this task. Suppose you have data to test in Cell A1 then you can enter Formula in cell B1 as =if(A1<>"-","Hi","") this means if Data in cell A1 is not - then enter Hi in cell B1 else keep B1 empty. See Screenshot attached.
You can do the following: suppose column A is full of values and you want to fill column B with "-". First, write the value "-" in the cell "C1", then select column B and write in B1 =$C$1 and then press Ctrl+Enter Key that's it
=IFERROR(IF(B1="","-",COUNTBLANK(INDIRECT("B1:B"&ROW()-1))+1),1)
Or avoiding INDIRECT:
=IFERROR(IF(B1="","-",SUM(IF(INDEX(B:B,SEQUENCE(ROW()-1))="",1))+1),1)

Find the Last Cell Value of the 2nd Column Set for each 1st Column Cell in EXCEL

I have the following structured table in excel where 1000s of rows included.
I want to return the Last Cell Value of Column B for Each value in Column A.
For example:
For Cell A1 -> I want to return the Cell B5.
For Cell A6 -> I want to return the Cell B9.
I have tried with VLOOKUP, HLOOKUP, INDEX likewise so many formulas where I ended with more conflict situations. Can anyone please write down a Formula to give my requirement a life?
Array formula (Press Control + Shift + Enter while entering the formula) in cell C1 and copy it down.
=IF(A1="","",IFERROR(INDEX($A2:$B$20,MATCH(FALSE,ISBLANK($A2:$A$20),0)-1,2),LOOKUP(2,1/(B2:$B$20),B2:$B$20)))
if you don't mind using column C as a helper column you could use something like that:
If you won't use Array formula you can Use this solution:
like this image:
use column C as helper with this formula in first cell =OFFSET(A1;SUMPRODUCT(MAX(($A$1:$A1<>"")*(ROW($A$1:$A1))))-ROW(A1);0)
and use this formula in column D's first cell =IF(A1="";"";INDEX($B$1:$B$13;SUMPRODUCT(MAX((ROW($A$1:$A$13))*($C$1:$C$13=A1)))))
and copy fill-down to all cells.
Try this shorter, without helper column and non-array formula solution
In C1, formula copied down :
=IF(A1="","",INDEX(B1:B$9,MATCH(1,FREQUENCY(1,0+(A2:A$9<>"")),0)))

Find a match on two excel columns

I want to compare data between two tables on excel and get the cells that match in two columns.
i.e:
Look for the value from cell G9 in column A, if found the check if the value of cell J9 Equals to cell D of the row in which the first match was found.
I tried Vlookup, index and match, but I'm still missing a function to complete the syntax
=IF(VLOOKUP(G9,$A$9:$D$1127,1,FALSE),IF(J9=D,"","new"),"new")
I don't know what to insert instead of D
Sample: https://drive.google.com/open?id=1aJZlpQ2V-bmwmS1Kwk-OIiSvXR552JJH
You can use MATCH on an array premises. If you want the number of the line when the values of G9 and J9 occur on columns A:A and D:D simultaneously, use the formula:
{=IFERROR(MATCH(J9,IF(A:A=G9,D:D),0),"No Match")}
If you want to return just the word "new" in case of a valid match use:
{=IFERROR(IF(MATCH(J9,IF(A:A=G9,D:D),0)>0,"new",""),"")}
Don't forget to use Ctrl + Shift + Enter to place the braces on the formula.
EDIT:
Since I'm having some troubles with showing my solution, I'll be more thorough.
Let's imagine you have the following worksheet:
For each row in the first table, if you want to check a match on the second table, you could place the formula
{=IFERROR(IF(MATCH(A1,IF(E:E=B1,D:D),0)>0,"new",""),"")}
on cell C1 and drag it to the end (to C22 on my example). You will get the next result:
Please, don't forget to press Ctrl + Shift + Enter when you're entering the formula on cell C1.

Identify minimum and maximum values based on 3 criteria

In the table shown, I need a formula for column D that will indicate the first date (minimum) and most recent date (maximum) that each participant (in column A) took survey A (in column C). Column D would need to indicate "first" and "last" tied to the Participant ID--for example, I would want D2 to populate with "3Last" and D5 to populate with "3First." Column E displays what I would need column D to display. If it's not a first or last date (something in between), or if it's not survey A, the cell in column D would be left blank or 0. If there is only one date that meets the criteria, it should return "First" rather than "Last." I'm pretty stumped on this one... Any help is much appreciated!
In E2, insert the ARRAY formula listed below. If you have never used an array formula, follow these steps:
select the formula from this page
copy it
go to excel
select cell E2,
press the 'F2' key
paste the formula
press CTRL+SHIFT+Enter (instead of just pressing enter)
To copy down, follow these steps:
Copy cell E2
Move down to cell E3 (instead of selecting a range)
Paste in cell E3
Select your range and paste from there.
If you don't copy down in this manner, it will tell you that you cannot change the array...
=IF($C2="A",IF($B2=MIN(IF(($C$2:$C$7=$C2)*($A$2:$A$7=$A2),$B$2:$B$7)),CONCATENATE($A2,"Last"),IF($B2=MAX(IF(($C$2:$C$7=$C2)*($A$2:$A$7=$A2),$B$2:$B$7)),CONCATENATE($A2,"First"))),0)
HTH

Identify which cell in a row contains a specific text

I have a column compromising of text, I would like to search through that entire column to identify in which cell does the contents contain text that I am searching for.
Snip of the excel data
I need to search for the text in the first column and identify which cell in the final column contains the data I am searching for.
You use this formula,
=IfError(VLOOKUP (A2, A2:D25, 3,False),"")
This formula will search for value match with A2 in data range A2:D25, in Column 3 means in C,, if find pull the match otherwise return a Blank. U can write "Value not found" within quotes also.
Use the formula in some column , say I,
=IF(ISERROR(FIND($A$1,F1,1)),"",F1)
Drag down till the end of list. This will return what all matches A1 with column F. If you want to search for A2, change the formula to A2 and do the same. This cannot be done for all columns in A with all columns with F as there is a chance that the same string can be found in one or more cells in F.

Resources