I need to compare the date of a cell against a column that has several dates, see which one matches and get the associated value. Here is an image to explain better:
Column D is where I need to put the formula, which compares the dates in column A of sheet 1 with the dates in column A of sheet 2. If it matches, I need to multiply the values in column C of sheet 1 by the values in column B of sheet 2.
Here is another image with an example to be clearer
I have a little idea that would be something like: =IF(ISERROR(MATCH(Sheet1!A4;Sheet2!A2:A32;0));Sheet1!C4*....
Where the ellipses are, B3 should go, but I don't know how to get that cell in the search above. I'm waiting for some ideas, thank you very much. :)
It is not as complicated as it seems, you only have to use the function
BUSCARV
in which you must place the date in your comparison parameter, the rangeHoja 2
where said date must be searched, the column indicator, that is, how many columns must be moved to find the value you want to return and then multiply it by the corresponding value in column C, something like this:This is the result:
I put the
SI.ERROR
in case the date did not exist or that the associated cell was empty, it returns 0 and in the rangeHoja2!$A$2:$B$3
since I did a test with few data, you must put your complete range of theHoja 2
. I hope I've helped. Greetings.