Excel - Search Sheet 1 using a list from Sheet 2 - excel

I have 2 sheets in Excel.
Sheet 1 contains a Column of Order Numbers amongst other things
Sheet 2 contains just a Column of Order Numbers.
I would like to search Sheet 1 for all of the order numbers that are contained in Sheet 2 and then either Highlight the matching order numbers or delete the entire row from Sheet 1 in which the matching order number was found.
I think this maybe possible using VLookUp?

This can be done without VBA:
use index/match or vlookup to find the the order numbers
filter the rows of Sheet 1 in order to see just the rows which are not found in Sheet 2 (depending on your formula, this could be Blank values, N/A, etc)
delete all rows where the lookup returned no match
Excel INDEX and MATCH Get Value

Related

How to INDEX MATCH return multiple words between sheets

In sheet 1 column 1 is a vertical list of words (e.g. A1:A25).
In sheet 1 column 2 I want to randomly put multiple X’s (e.g. in a few cells between B1:B25).
In sheet 2 I want to return whatever words are to the left of the X’s in sheet 1. How would I do this?
Im currently returning one word using the following formula:
=INDEX(Sheet1!A1:A25,MATCH("X",Sheet!B1:B25,0))
What formula would return multiple words to sheet2 from column 1 of sheet1 (via X’s in the second column of sheet1)?
With the dynamic array formula available in Office 365, use FILTER:
=FILTER(Sheet1!A:A,Sheet1!B:B="X")
Put that in the first cell and the results will automatically spill down.
With older versions, put this in the first cell and copy/drag down:
=IFERROR(INDEX(Sheet1!A:A,AGGREGATE(15,7,ROW(Sheet1!$B$1:$B$25)/(Sheet1!$B$1:$B$25="X"),Row($ZZ1))),"")

How to return the entire row based on two cells from two different Excel sheets matching?

I have a large Excel data file, with data from two different sheets. I want to be able to match the partner_identifier values from SO Sheet 2 to the values in BB Sheet 1. For the rows in BB Sheet 1 that do match, I want to bring the entire row into a new sheet.
I need help coming up with a formula for this. I've tried VLOOKUP and IF variations, but I think I need a more complex formula. I can't do an =IF('SO Sheet 2'!D3='BB Sheet 1'!D3) because the matching values could be in different rows.
Right now, I have (and I know this is off because it returned "No" for every row, even the ones with a matching value) :
=IF(D3='SO Sheet 2'!D3:D16,'BB Sheet 1'!D3,"No")
Any insight would be greatly appreciated!
If you are using latest version of excel (Excel for Microsoft 365) - you can use XLOOKUP or FILTER formula.
Example:
= FILTER('SO Sheet 2'!A3:D16, 'SO Sheet 2'!D3:D16=D3)
Check here for details about these formulas: XLOOKUP, FILTER
You can achieve the result in 2 steps. in Sheet "BB sheet 1", you need to add a column E with XLOOKUP formula to find the matching identifier in "SO sheet 2"
=XLOOKUP(D2,'SO Sheet 2'!$A$2:$A$14,'SO Sheet 2'!$A$2:$A$14,"No")
The above will list all the matching identifier and put "No" wherever if couldn't match the identifier.
Then all you got to do is , in a new sheet, enter the formula in cell A1
=FILTER('BB sheet 1'!A:D,'BB sheet 1'!E:E<>"No")

Unable to copy data of intersecting row and column to another sheet

I am trying to copy data from one sheet to another using index and match as i want specific data of intersecting rows and column.
i have attached the sheet where sheet 1 is source sheet and sheet 2 is destination. i want in cell value(C7) of sheet 1 and Cell value(B2) of sheet 2 same.I am using index match function but its returning department value.
=INDEX(Sheet1!A3:H15,MATCH(Sheet1!A7,Sheet1!A3:A15,0),MATCH(Sheet1!C3,Sheet1!C3:H3,0))
https://docs.google.com/spreadsheets/d/1YuIbG1tDQ9tp1k5OrZ8slP1PUCjG4vsRsAVLZbt8Wyw/edit?usp=sharing
Your second match range is less than the table width. Change C3:H3 to A3:H3 and you may get the result you want.
I find it helpful when doing multiple MATCH functions to break them out into a scratch area on the spread sheet and examine them separately. Then combine the correct formulae into the single cell formula.

VLOOKUP and Record Count Excel

Two spreadsheets: Spreadsheet 1 and Spreadsheet 2
I am trying to find out which records in spreadsheet 1 exist in spreadsheet 2 (Currently basing it off a single column)
I am doing a v look up to match two columns of data. After the match, I want to do a record count to count how many of the same matches it found (displayed in another column)
Here is a my vlookup formula
=VLOOKUP('[Spreadsheet1.xlsx]Complete'!$B:$B,Y:Y,1,FALSE)
If I understand your question, for each row in Spreadsheet 1 you want to return the number of times the key of Spreadsheet 1 appears in Spreadsheet 2. This will give you how many times what's in cell B1 appears in column Y:Y:
=COUNTIF('[Spreadsheet2.xlsx]Complete'!$Y:$Y, $B1)
I'm assuming you're attempting to determine whether or not some unique value like an ID exists in both Spreadsheets 1 and 2. What I would do is add a column to both to check the other for the existence of the value with something like this:
For Spreadsheet 1
=IF(ISERROR(MATCH(B1, '[Spreadsheet2.xlsx]Complete'!$B:$B, 0)),"",1)
For Spreadsheet 2
=IF(ISERROR(MATCH(B1, '[Spreadsheet1.xlsx]Complete'!$B:$B, 0)),"",1)
For the MATCH function, if there is a match it returns the row number of the match, if there is no match it returns an error. This formula will add a 1 to the column if there is a match and leave the cell blank if there is no match. Take the sum of this new column get a match count in each sheet.

Link two cells of a column in different sheets if a value in a cell of other column matches in other sheet

I have a workbook with 7 sheets containing part number of a product in column and its cost in adjacent column. And the 7th sheet contains total number of parts in all the sheets. I want to change cost of some products but then I have to do the same in all sheets. Is there a way by which it automatically finds and changes cost in individual sheets when i change it in the sheet containing total?
Use VLOOKUP on the first 6 sheets to match the price to each part number.
So, in each "cost" column on the first 6 sheets, enter this formula (assuming Cost on Sheet7 is still in column C):
=IFERROR(IF($A1="","",VLOOKUP($A1,Sheet7!$A:$C,3,FALSE)),"")
If you have header row(s) then just replace the two instances of $A1 in the formula with whatever the first row of data is (e.g. $A2), paste the formula into that row in column C on Sheet1, then drag-copy the formula down as far as you want. Repeat for sheets 2-6.

Resources