Reputation: 77
I am encountering a small problem in excel. I am making a sheet in excel using various formulas but got stuck at a point.
My query is: I have a "Name" in Cell say B2. On the other sheet, there is a table which consists of lots of names.
I need a formula in cell F2 which will look the value in Cell B2 in the table and if it matches, then cell F2 will show the result by multiplying cell D2 and E2. If the value is not located in a table, then the result will be 0.
Please help me out in it as i have tried both vlookup and index match.
Thanks Salman Khan
Upvotes: 1
Views: 209
Reputation: 522636
Enter this into cell F2
:
=IF(COUNTIF(Sheet2!$A$2:$A$6,B2)=1, D2*E2, 0)
This assumes that your list of names is located in Sheet2
in the range A2:A6
(hence just 5 names in my example).
Make certain that you use absolute cell referencing in Sheet2
when you copy this formula to the other cells in your F
column.
Upvotes: 0
Reputation: 1999
Im not on excel now, but ill give you the algorythm yo solve your problem. I would like to assume you know the ff functions that i will mention.
If( vlookup(B2, sheet2!A:A, 1, 0) != "#N/A", D2*E2, "Not found" )
Im not sure if that is the exact formula but thats the algo fir that..
Upvotes: 0