Search for word and add additional word to it and together copy to new row - excel

I need small help. My problem is:
In sheet A under column A and B I have following:
Column A | Column B
----------------------|-------------------
New Orleans, Buffalo | Miami, Atlanta
etc | etc
. | .
. | .
I need formula to compare this words with Column C full names
Column C
New Orleans Saints
Miami Doplhins
etc
.
.
And Paste them to lets say Sheet 2 under column A and B as full name
Column A | Column B
--------------------|-------------------
New Orleans Saints | Miami Dolphins
etc | etc
. | .
. | .

Assuming your data is consistent i.e. Column A and Column B are in format xxx, yyy and you want to search for xxx in Column C, then as per image below enter the following formula in Cell E2
=IFERROR(INDEX($C$2:$C$50,MATCH(LEFT(A2,(FIND(",",A2,1)-1))&"*",$C$2:$C$50,0)),"")
Drag/Copy this formula to Column F and down as required. Change range as per your data.
Or if you want result in Sheet2 then enter following formula in Cell A2 of Sheet2
=IFERROR(INDEX(Sheet1!$C$2:$C$10,MATCH(LEFT(Sheet1!A2,(FIND(",",Sheet1!A2,1)-1))&"*",Sheet1!$C$2:$C$50,0)),"")
Drag/Copy this formula in Cell B2 and down as required. Change range as per your data.

Related

Is there a formula in excel to find if a two letters cell in row1 exist in row2 and 3?

I have a sheet in excel with three rows and three columns. I am looking for a formula in excel to find if the letters in first row exists in two other rows (each cell has two letters). For example this is my data:
A | B | C
------+----+---
1. MN | MM | HO
2. NN | KM | JJ
3. LM | MM | KO
I want to have a formula to return number of cells that are not match for each row, in column D and highlight the cells in row 2 and/or three that not exists in row one.
For example in my data: The string in C1 is HO and we have O in C3 but we don't have H in C2. But for two other columns (A & B), one letter of row A1 (MN) is in row A2 (NN) and the other one in A3 (LM), so row 2 column C should highlighted in red and number of mismatch should be 1 in row2 column D.
Comparisons are made individually in each column and the sum of the cells that highlighted in red is written in column D of the corresponding row.
Any help would be greatly appreciated
Thanks in advance for your help.

Extracting all information(different) with same row name form a excel worksheet using formula

I have a excel workheet having a table with multiple rows having same name with different information in the corresponding columns. Now using a formula I want to extract this infomation into a new table? SOLUTION HAS TO BE USING AN EXCEL FOMULA ? NO FILTERS NO PIVOT TABLE OR VBA
I have tried vlookup. to search for multiple values. I dont want information from a single column but rather from all the columns. There could be thousands of columns with same and different values.
I have tried this formula : =INDEX(Worksheet!A2:AK350;KKLEINSTE(WENN((A5=Worksheet!A2:A350);VERGLEICH(ZEILE(Worksheet!A2:A350);ZEILE(Worksheet!A2:A350));"");1))
The table looks like this for example:
Place People Salary Status
japan | resident_1 | 564 | un-married
Delhi | resident_1 | 655 | un-married
china | resident_1 | 564 | un-married
japan | resident_2 | 748 | un-married
Now I want to extract a sub table from the above, like all the
infomation having PLACE name as "japan"
the reult should be this for each place in a different table:
japan | resident_1 | 564 | un-married
japan | resident_2 | 748 | un-married
Seems like a job for advanced filter, but you've already stipulated "no filters". If you're able to add two helper columns in your main table, maybe you can use the approach below.
This is my main_table worksheet (note the columns outlined in red, which have been added).
The formula in column E (starting from cell E2) is: =CONCAT(A2,"|",B2,"|",C2,"|",D2)
The formula in column F (starting from cell F2) is: =ROW()-ROW($F$2)+1
Drag/fill these formulas down to the last row in your main table.
This is my sub_table worksheet (note the cells outlined in green at the top, where you will eventually specify filter criteria).
The formula in column A (starting from cell A5) is: =ROW()-ROW($A$5)+1
The formula in column B (starting from cell B5) is: =IFERROR(SMALL(IF(ISNUMBER(SEARCH($B$2,main_table!$E$2:$E$10)),main_table!$F$2:$F$10,""),$A5),"")
The formula in columns C, D, E, F (starting from cell C5) is: =IF(ISNUMBER($B5),INDEX(main_table!$A$2:$D$10,$B5,COLUMNS($C5:C5)),"")
The formula in cell B2 is: =CONCAT(IF(ISBLANK($C$2),"*",$C$2),"|",IF(ISBLANK($D$2),"*",$D$2),"|",IF(ISBLANK($E$2),"*",$E$2),"|",IF(ISBLANK($F$2),"*",$F$2))
You should drag the formula down for the same number of rows that are in your main table.
I think newer/upcoming versions of Excel have a JOIN worksheet function which is more convenient/flexible than my usage of CONCAT above (so maybe use that if it's available to you).
Leaving the filter criteria blank should give you all rows. If you want partial matches, include wildcards in your input e.g. jap* or resident_*. If any of the values in your main table contain a |, you may want to use a different delimiter in the CONCAT formulas (otherwise you may get unexpected results/behaviour).
Once you're done, maybe you can use it like shown below:
See if this approach is any good for you (you will probably need to translate the formulas to your locale/region).

Excel IF Formula 3

I have a sheet with rows of data that I want to copy to a different sheet if the name in column a equals a certain value. For example:
A | B | C
Name | Color | Amount
Sue | Blue | $400
Joe | Green | $1000
Sheet Sue needs to bring columns B and C from Sue's records to it's worksheet if column a equals Sue
Sheet Joe needs to bring columns B and C from Joe's records to it's worksheet if column a equals Joe
and so on and so forth...
Can anyone help!?
Well, if you don't have too much data you can do this with array formulas.
Set up your main sheet (assuming it's Sheet1) with named ranges. Your A2:A100 name it Name, B2:B100, name it Color, and C2:C100 name it Amount. (Adjust the range as necessary)
Then, in each of the people's sheets, have header rows called Name, Color, and Amount. Then you can use this formula (entered with CTRL+SHIFT+ENTER):
=INDEX(INDIRECT(A$1),SMALL(IF(INDIRECT($A$1)=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255),ROW(INDIRECT($A$1))-ROW(Sheet1!A$2)+1),ROWS(Sheet1!$A$2:A2)))
Wrap IFERROR([formula],"") to hide the #NUM errors when you reach the end of the data.

Formula to get cell values of specific column and a variable row number

I need a formula to retrieve a value defined by a specific column (always B) and a variable row number (A).
What is the formula I need to write in column C to retrieve the right names as shown below?
_A_____B_______C_____
3 | Lucas | Gary <--B3
_____________________
1 | Mark | Lucas <--B1
_____________________
2 | Gary | Mark <--B2
You want to use the INDIRECT function.
Column C should be:
=INDIRECT("B" & $A1)
=INDIRECT("B" & $A2)
=INDIRECT("B" & $A3)
(you can just enter the formula in the first cell and copy it down)

If column B cell value contains A cell value

I have two columns A and B in excel and I want third column output to be like show below
A B C
-------------------
a | sd | a.com
d | a.com |
f | g.in |
g | ad | g.in
B column has 'a.com'which contains 'a.' so C column it displays a.com
.B column doesnt have which contains 'd.' so column cell is empty and so on..
Put the following formula in column C:
=IFERROR(INDEX($B$1:$B$4,MATCH(A1,LEFT($B$1:$B$4,SEARCH(".",$B$1:$B$4)-1),0)),"")
It is an array formula, so press Ctrl-Shift-Enter instead of Enter when entering it.
Try this formula in C1 copied down
=IFERROR(VLOOKUP(A1&".*",B$1:B$4,1,0),"")
IFERROR function only works in Excel 2007 or later - for earlier excel versions try
=LOOKUP("zzz",IF({1,0},"",VLOOKUP(A1&".*",B$1:B$4,1,0)))

Resources