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

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.

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:

How do I create a formula for summing the product of cells, based on their value? [duplicate]

This question already has answers here:
excel Formula to sum values in a column based on another value(txt) in any column
(5 answers)
Closed last year.
I have two columns of values. I want to add up the product of the two values, where the 2nd is grater than 1.
Now I'm using a separate 3rd column to aid in this and sumif the values based on the x2 column.
=SUMIF(B1:B9, ">0", C1:C9)
X1
X2
Prod
4
3
12
4
4
16
5
1
5
6
0
0
10
4
40
The result in this case should be 12+16+40 = 68
Is it possible to do the same without the 3rd column?
Below should work
=SUMPRODUCT((A2:A6)*(B2:B6)*(B2:B6>1))
Use the FILTER() function, using the 2nd column as the test.
=SUM(FILTER(A1:A5*B1:B5,B1:B5>1))
I found another solution that I have somehow missed before
=SUMPRODUCT( --(B1:B9 > 1), A1:A9, B1:B9)

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

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)

How do I make a cell value represent a number in Excel?

I have
Year 1 2 3 4 5 6
I'm trying to make it so that each year number 1-6 is equal to another number value i.e. Year 1 is equal to 5. Year 2 is equal to 6.
You will not be able to store one value in a cell and use a different value for calculation. However you may do this calculation with the help of a lookup from another table,
Assuming you have the years in Column A and the corresponding mappings are in Column E and F, you can use the below formula in Column B,
=INDEX(E:F,MATCH(A1,E:E,0),2) * 2
This formula lookups the value in A1 in the table E:F and returns the corresponding Column F element. That is finally multiplied with the 2 to show your result. Instead of just using just A1 for multiplying by 2, you should be using INDEX(E:F,MATCH(A1,E:E,0),2). Hope this helps.

EXCEL: Color cell if column is "nth" in the row

Here is an example excel table
Row# A B C D E F G
1 Q# Ans Student Answers
2 1 4 0 3 1 4 2
3 2 2 1 7 9 2 0
4 3 3 5 1 1 3 8
Column A stores the question number, Column B is the index of the correct scantron answer (1-5 for A-E).
Columns C-G are sums of the student's answers and how many of them answered each option, so for example:
Question 2, the correct answer was B (because column B is stored as
2). C-G say that 1 student answered A, 7 answered B, 9 answered C, 2
answered D and none selected E on the scantron.
With each exam, the values in column B change around. I would like a way to conditionally format columns C-G so that only the nth column is colored (as dictated by whatever the number of A is). So for question 2, it would color the cell at D3 green or something.
I tried to figure this out with conditional formatting, but I can't say if the values match column B, because B is a indicator for which column is correct, not a value to match in each column.
I'm comfortable implementing VBA code, so that works as well, I'm just not familiar enough with it to know how to construct the proper code to insert into my spreadsheet.
Put the answer number accross the top of the data in row 1:
Then you can use the following formula:
=MATCH($B2,$1:$1,0)=COLUMN(C2)
And apply it to the answer statics area, in this case $C$2:$G$4
Or if your answer statistics always follow the Ans column you could use this formula for the same result:
=COLUMN($B2)+$B2=COLUMN(C2)
Without the need of the title row.

Resources