Can you match or search with cell matching part of another? - excel-formula

I'm trying to create a formula in Excel where I can use an Index / Match formula where I'm searching for only part of one cell.
For example:
Sheet 1
Column A --> Full Name
Column B --> Removed status
Col A
Col B
Col C
Col D
Col E
1
Col D + Col E
Removed status
agent #
Agent F Name
Agent L Name
2
Sheet 2
Column A --> Sheet 1 Column B --> only if Sheet 1 Column A is part of Sheet 2 Column D
Column D --> Full Name 1, Full Name 2, Full Name 3
Col A
Col B
Col C
Col D
Col E
1
Sheet 1 Col B
AutoP status
Carged
Name 1, Name 2, Name 3
Notes
2
So, I'm hoping to get a formula to display Sheet 1 Column B into Sheet 2 Column A only if Sheet 1 Column A can be found as part of Sheet 2 Column D.
Is this even possible?

If you want to search for part of one cell, you can use find formula which search for given text within cell value find(text,withintext) and it return index that the text start with and error if not.
And if you need your process to be work line by line,
the final formula ( for row2 of sheet2 column A ) would look like this:
=IF(AND(NOT(ISERROR(FIND(Sheet1!A2,Sheet2!D2))),Sheet1!A2<>""),Sheet1!A2,"")
if row2 of column A of sheet1 is not empty and is found (no error returned);the value of sheet1 column A returned otherwise empty will returned.
Hope that was useful.

Related

Excel 2019: Copy data from sheet2 columns B, C, D to sheet1 columns B, C, D based on value of sheet1 column A

I have the following conditions:
I have a Workbook with 2 WorkSheets named Data and Users
In Data, I have column A populated with numbers ranging from 1 to 9999999
In Users, I have column A populated with numbers ranging form 1 to 9999999
In Users, I have multiple rows of each of the numbers (example 10 rows of 1, 18 rows of 2, 32 rows of 3, etc.)
In Data, cells B, C and D are empty
In Users, cells B, C and D contain email, first name, last name
What I am trying to do is to copy Users : B, C and D values to Data : B, C and D empty cells.
I'm trying to use the INDEX and MATCH functions, but cannot get it to run - continually getting errors.
Here is an example of what I've tried in a test cell in my Users sheet:
=INDEX(Users!A:A,MATCH(1,(A2=Data!:A:A),0))
So, to clarify.
I have:
Users sheet:
A B C D
1 me#me.com First Last
Data sheet:
A B C D
1
1
1
1
My objective is to populate every row in Data with the values of Users B, C and D whenever the value in column A matches.
The end result would look like:
Data sheet:
A B C D
1 me#me.com First Last
1 me#me.com First Last
1 me#me.com First Last
1 me#me.com First Last
Thanks in advance.

scan Excel column based on another column value

I want to check one entire column with value in another column and then assign a value in another column value to matching row cell.
Eg-
A B C D
1 10 X
2 3 Y
3 2 Z
4 11 K
What I want to do is take one value at a time from column A eg 1 and then scan through Column B if matches the Column A (value 1) then assign x to that row under D. eg if we check A3 ( value 2) with column B and found 2 is on B4 then D4 = Z. Like this I want to check all values in column in A against column B assign relevant vale from column C to Column D
How can I do this, can someone please help me.
Thanks.
Try:
= IFERROR(INDEX($C$2:$C$5,MATCH(A3,$B$2:$B$5,0)),"no match")
See below.
Try:
=IFERROR(VLOOKUP(A1,$B$1:$C$5,2,0),"")

Sum of multiple columns if they match

I have this table of data:
A B C D E
003B1016 1 003G1016 1 003B1016
003G1015 1 003G1391 2 003G1015
003H0121 4 003H6208 2 003H0121
003H6209 1 003H6209 1 003H6209
I want to sum B+D if A and C are identical , how would i do that?
I have another 32000 rows of data. :) Thanks for the help
Put this in cell E1 and copy down:
=IF(A1=C1,B1+D1,"")
This says - if A = C, then add B+D. Otherwise, return blank "".
EDIT for new requirements
In order to add all amounts from column B where column A matches the current row and from column D where column C matches that row, where the row in column A exists anywhere and the row in column C exists anywhere, do the following formula in E2 and drag down:
=IF(ISERROR(MATCH(A2,A$1:A1)),IF(ISERROR(MATCH(A2,C:C,0)),"",SUMIFS(B:B,A:A,A2)+SUMIFS(D:D,C:C,A2)),"")
This says: look above the current row in column A - have we seen this item before? If no, continue with the formula. If yes, ignore, to avoid double counting. Then, Look at all of column C - does the value in the current row of A occur anywhere in column C? If no, then don't add anything. If yes, Add all items from column B where column A matches the current row, and add all items from column D where column C matches the current row.

Excel Comparing Cells in Different Sheets

i have this problem2 days now if anyone could help me
sheet 1
col A col B C(price) D E(barcode)(1000 entries)
sheet 2
col A col B C(price) D E F G I(barcode)(10000 entries)
i want to make a formula that compares col E(sheet 1) and col I (sheet 2) and if they are the same the result is to replace the price of col C(sheet 1) with the price of col C(sheet 2).
if that is not possible, then to show the price of col C(sheet 2) to a new Col F of sheet 1
Thanks in advance.
You should use Index and Match combo to get the price from sheet 2
=INDEX(Sheet2!C:C,MATCH(Sheet1!E2,Sheet2!I:I,0))
To make sure that no #N/As are displayed, just add Iferror like this:
=IFERROR(INDEX(Sheet2!C:C,MATCH(Sheet1!E2,Sheet2!I:I,0)),"")

Spreadsheet: If row in sheet contains 2 criteria then get value of cell

Sheet 1 gets values from Sheet 2.
Sheet 2 has hundreds of rows, but only 4 columns. (Cols A & C are names, Cols B & D are numbers).
Cell XX (sheet 1): Looks in Sheet 2, For "Bill" (col A) and "Jill" (col C) where they BOTH appear in the same row, then returns number from col B (from row where "Bill" and "Jill" are found) to Cell XX in sheet 1.
If "Jill" is in col A and "Bill" is in col C - then conditions are not met, and do not return value.
How do I write this?
I am so confused. PLEASE, someone help me?
Lookup Sheet 2 For "Bill" (Col A2:A300) AND "Jill" (Col C2:C300) Get number in Col B.
One solution is to create a helper column E. Use this formula in the first row (i.e. cell E1):
=$A1 & "-" & $A3
and fill this down for the other rows. If ColA = "Bill" and ColB = "Jill", then ColE will be "Bill-Jill".
You can then do a MATCH to find out with row has "Bill-Jill", and pick up the corresponding value from ColB:
=IF(ISNA(MATCH("Bill-Jill";e:e;0));"No match";INDEX(b:b;MATCH("Bill-Jill";e:e;0)))
The MATCH formula will find out which row contains "Bill-Jill", and the INDEX formula will pick up that row from another column. MATCH will return #NA if there isn't a matching cell, and this will be captured by the ISNA check.
I'm not sure if OpenOffice supports the MATCH function - it's definitely part of Excel though.

Resources