Locate matching values in different XLS sheets and copy other cell values from matching row - excel-2007

Sheet1 column B contains my customer number- I need to locate this customer number in Sheet2 column F. Then copy the value from Sheet2 AE (from the row with the matching customer number) into the matching customer number row in Sheet1 column E. Note that sheet1 column B and Sheet2 column F contain the same customer numbers, but not in the same order and sorting is not an option.

So, after much trial and error I worked out the perfect solution! Thought I'd share just in case anyone else is trying to do the same.
I entered the following into column E:
=INDEX(sheet2!$AE$4:$AE$10000,MATCH(B4,sheet2!$F$4:$F$10000,FALSE)*1)

Related

Populate another sheet with the same columns but only selected rows

I have three columns: in column A I have Suppliers, B has Order Dates and C has Types ("Merchant" and "FBA").
How do I populate another sheet in the same Google Sheets with the same three columns but only with rows that have "FBA" in column C?
I want them to auto-populate so when I add another row in Sheet1 where column C is "FBA", it will automatically add that row to the next available row in Sheet2. I'm guessing I use the Index formula but am unsure how to use it.
Please try something like:
=query(Sheet1!A:C,"where C ='FBA'")

If value match on different sheet, then copy data from the sheet one to other sheets

I have Sheet1, Sheet2, Sheet3, Sheet4
I want the formula i.e. if I enter any value in Sheet2, Sheet3, Sheet4 in Column E, then it should match that value with Sheet1 Column A, In case of value match, the data value of sheet1 should be copied to all other sheets.
EG:- In sheet1 I have the below mentioned data.
(A Column / B Column / C Column)
(Product Value / Cost / Packing)
(200 / 100 / 50)
(150 / 70 / 20)
(300 / 120 / 50)
(500 / 300 / 100)
To illustrate, if in Sheet2, Column E if I put a value 150, then the formula should scan for that value in Sheet1, Column A , and find its match in 2nd row, then it should copy the data of column B (i.e 70) to Sheet2 column N and similarly copy the Sheet1 column C (i.e 20) to Sheet2 column O.
If I enter value to Sheet2, Sheet3, Sheet4, Sheet5 then formula should scan the value only from Sheet1 and copy the data,to its respective places as described in the preceding paragraph.
This is relatively simple and straight forward to do with vlookup.
I am making the assumption that the value to lookup is in Cell E2 (regardless of the sheet)
Use the following formulas for Column N2 on Sheet2,3,4,5, etc and then drag down to how many rows as needed:
=VLOOKUP(E2,Sheet1!$A$2:$C$5,2,FALSE)
Use the following formulas for Column O2 on Sheet2,3,4,5, etc and then drag down to how many rows as needed:
=VLOOKUP(E2,Sheet1!$A$2:$C$5,3,FALSE)
Adjust the "$A$2:$C$5" formula part to match the appropriate range in your Sheet1 table. Or replace the "5" with the number of rows with product data in Sheet1. You can also use "Sheet1!A:C" to just search all the rows.
This formula does not "copy" the data to the other sheets, it merely displays the value based on the lookup value in column E.
The first argument of VLOOKUP is the Lookup value (the "product value"). We want to reference the cell in column E for this. (I used Cell E2, as I assume you have a column header in E1).
The second argument of VLOOKUP is the Table array (Sheet1!$A$2:$C$5). This is where we want to look for our value from column E. Keep in mind, vlookup only searches thru the first column for the criteria value. The dollar signs ($) make sure that the lookup table reference stays static and does not change if you try to autofill the formula down all the rows in your column.
The third argument of VLOOKUP is the column index. When it finds a match in the first column, this integer will tell vlookup which column to return. 1 returns the 1st column, 2 returns the 2nd, and so on.
The "FALSE" parameter tells the formula to only find exact match. If this is set to "TRUE" and your list is not sorted in ascending order, you will run into trouble with vlookup trying to find the closest match rather than an exact match.

how to create a column that only gets the matching value from another sheet in EXCEL

i would like to create an extra column in sheet one which displays a character (for example G) after it finds the matching values from sheet 2.below are two screen shots i have taken for all your conveniences.
please note,in sheet 1 i have marked two rows with identical bs_cd 6374 which matches the bs_cd 6374 in sheet 2 also.what i want is to have a character G in sheet 1 under column G.
thanks in advance
Insert into the cell G2 this formula and drag it down:
=IF(VLOOKUP(B2;Sheet2!$A$2:$A$100;1;FALSE)=0;"";"G")
Change $A$2:$A$100 to your range in sheet2

vlookup if name is matched display employee id

Ive never used vlookups i have a spreedsheet not sure if this is the right function. I have two sheets
Sheet 1
first name last name username
Sheet 2
first name last name employee id business unit
I need in column D on sheet 1 to have employee id ive below. Pay no attention to column letters and sheets because i moved to another sheet to try getting this right.
=MATCH(B11,Sheet1!C:C,0)
Any help is much appreciated.
So you realize you have to match both first and last names? There are several ways to accomplish this depending on how many employees you have in sheet 2: a) small list could a two-column search using array formula; b) large list just create another column in both sheets joining last & first names and do a MATCH or VLOOKUP on them.
Since your needs are simple and to illustrate option (b):
Insert a column in both Sheet1 and Sheet2 after the "last name"; you should now have an empty column C in both sheets.
Assuming you have column headers in row one, and thus data starts in row two, set cell C2 in both sheets with function =B2&","&A2, then fill-down that formula on both sheets in all rows.
Set Sheet1 cell E2 to formula =VLOOKUP(Sheet1!C2, Sheet2!$C:$D, 2, False), and fill-down that formula in all rows.
Voila, employee IDs on Sheet1. I do have to say this is so Excel 101. There are all sorts of examples and tutorials on this easily found using even the most trivial Google searches.

How do I copy specific cells from sheet 1 and paste into corresponding rows of sheet 2 , based on values of cells in sheet 2?

I have Sheet 1 with lots of columns, where column A is the list of all customer codes. In sheet 2 I have column A as some selected customer codes. Now based on the selected customer codes in sheet2 I need to extract few columns (H,I,J) from sheet1, paste it into sheet 2 and export the result to a new sheet.
Excel noob here. Hope you understood my query.
Assuming customer codes are unique in column A (i.e., the same code does not appear multiple times) you can do all of this with VLOOKUP function.
No need for VBA. In column B, Sheet 2: =VLOOKUP(A1,Sheet1!A:J,8,False) will return the value corresponding from column H (H being the eighth column of the range A:J).
Likewise do this for column I:
=VLOOKUP(A1,Sheet1!A:J,9,False)
And if you guessed also do this for column J:
=VLOOKUP(A1,Sheet1!A:J,10,False)