Excel Compare values from two tables and copy data [duplicate] - excel

This question already has answers here:
Excel Lookup function for text [duplicate]
(2 answers)
Excel formula to copy data adjacent to a cell and paste it next to a duplicate cell in another column
(2 answers)
Excel Formula for Inventory
(1 answer)
Excel - find cell with same value in another worksheet and enter the value to the left of it [duplicate]
(2 answers)
Check if an excel cell exists on another worksheet in a column - and return the contents of a different column
(1 answer)
Closed 1 year ago.
I have a small Excel task that I am stuck on.
I have two Excel tables and would like to fill table 1 with values from table 2.
Example:
Table1:
A
B
C
D
E
1
Dude
2
Table2:
A
B
C
D
E
1
Max
Muster
Way
3
53
2
Dude
Test
Street
42
44
The formula should now copy the value from Table2 B2 in Table 1 for B1.
This means that the formula must find the correct row in table 2 using the value in table 1 A1 and copy the value from column B.
Does anyone have any ideas?

An easy way would be using INDEX and MATCH:
My formula in column I is:
=INDEX($B$1:$E$2;MATCH($H1;$A$1:$A$2;0);1)
Notice last argument of INDEX is 1 for column I, 2 for column J, 3 for column K and so on. Depending on where is your data you may need to adapt this part. And for sure you can use another formula to autoselect proper column instead of typing 4 different formulas, but as I said, this would be the easiest way (not the cleanest, tough)

Related

i want to put all column for 1 row into row in xls [duplicate]

This question already has answers here:
How to "flatten" or "collapse" a 2D Excel table into 1D?
(9 answers)
Closed 9 months ago.
i want to put all column for 1 row into row in xls
input:
Output:
Not the cleanest way but it does the job.
Formula in column I:
=INDEX($A$1:$A$4;ROUNDUP(ROW()/5;0))
Notice the division between row number and 5. The divisor is 5 because you got 5 elements to get (c1,c2,c3,c4,c5). Change 5 to whatever columns you need to fecht.
Also, please notice you need to drag manually until you get the quantity of elements. In this case, your data is a table of 4x5 = 20 so you need to manually drag the formula from row 1 to row 20
Formula in column J:
=INDEX($B$1:$F$4;MATCH(I1;$A$1:$A$4;0);COUNTIF($I$1:I1;I1))
Select your data
Data -> from Table/Range (unselect "My Data has headers")
(=> Power Query Editor is started)
Select Column 2 to Column 6 in Power Query Editor
Transform -> Unpivot Columns
Home -> Close and Load to ... (Existing Worksheet "H1")
DONE! ;-)
Screenshot step 2:
Screenshot step 3+4:
result:

Vlookup does not return the result on the index number [duplicate]

This question already has an answer here:
Excel Vlookup Function
(1 answer)
Closed 10 months ago.
I am implementing the VLOOKUP in the excel
When I use the index 3 it works
when I put index 4 it does not return anything .
Both the index has some values. It should return . What could be the problem ?
This is Monthly sheet columns .. it has columns till M
You table has 3 columns A, B & C, so using 3 picks the result in column 3, but 4 won't exist as there is no column.
You gave the range in Table_Array as Monthly!A:C, so it won't know about any columns after column C as shown in both your images, only one shown here:
So do the correction and put Monthly!A:M then you can address the rest of the columns, until then it will not work.

Excel - Find Column and Row from Table

I'm trying to build a Sudoku calculator using only Excel (no VBA). As part of the process, I'm using the Position table (see image) as my reference for each cell. If I look at say position 12 in the table, how would I pull column 4 in one formula and row 2 in another formula?
Use AGGREGATE:
Row:
=AGGREGAT(15,7,(ROW($N$5:$V$13)-MIN(ROW($N$5:$V$13))+1)/($N$5:$V$13=12),1)
COLUMN:
=AGGREGAT(15,7,(COLUMN($N$5:$V$13)-MIN(COLUMN($N$5:$V$13))+1)/($N$5:$V$13=12),1)
replace the =12 with = and your cell reference.
But if you use base 9 with two digits, you can just parse the number:
ie:
Now the first digit + 1 is the row and the second + 1 is the column

copy values of a column from one sheet to another sheet based on value of first column [duplicate]

This question already has answers here:
Remove #N/A in vlookup result
(4 answers)
Closed 4 years ago.
This is my first excel task and I am a bit lost. Here are my sheets:
sheet1
name product_id
ABC
DEF
ERG
ZYT
sheet2
name product_id
ABC 1
DEF 2
WRT 8
ERG 9
Now what i want is for sheet product_id field to be filled in based on name field of the sheets. E.g. ABC is 1 in sheet 2 and in sheet 1, i need it to become 1 also. The number of rows differ (sheet 1 is shorter) and any not found names in sheet 1 should be ignored. In the end, I need sheet 1:
sheet1
name product_id
ABC 1
DEF 2
ERG 9
ZYT
Since ERG and ZYT are not found in sheet 2, they should be ignored. The order of the names could be different so I am looking for away to scan/loop and replace, if i am making any sense.
I have seen this https://www.extendoffice.com/documents/excel/4112-excel-copy-column-based-on-cell-value.html but it keeps on saying formula incorrect.
I am not familiar with VBA so it would be nice if it can be done using simple excel formulas.
Update:
following the suggested answer, i did come close but somehow rows are skipped if A column (searched column) don't match
You can do this with a VLOOKUP. This goes in your sheet 1 in cell B2, then drop this down to your last cell
=IFERROR(VLOOKUP(A1,Sheet2!A:B,2,0),””)
If it does not find your value it will return “”. You can put anything inside the quotes if you want it to show something else, like maybe “Stack Overflow is Awesome”

Excel Formula - 2 sheets, multiple references [duplicate]

This question already has answers here:
Excel Cross Sheet Lookup Formula
(1 answer)
Excel issue with Function VLOOKUP
(3 answers)
Closed 5 years ago.
So I have 1 Excel Sheet with 2 tabs. In Sheet 1 I have a column of numbers All Data. In sheet 2 I have 3 columns, Numbers, Count and Balance. I need a formula so that I can say: If X number in Sheet 1 Column 1 MATCHES Sheet 2 Number column then DISPLAY values from Columns Count and Balance.

Resources