I have a calc spreedsheet, which is mostly similar to excel regarding formulas. In one sheet I have the details of some boughts I've done (comprasDet
) and in another the items I can buy (productos
).
The first entry in comprasDet
looks like this:
I need to retreive from productos
the last registered cost from "Shampo y Mascarilla Chocolate....", put it in ctUnit (that stands for unitary cost) and then calculate the entry cost in ctTot.
The last registered costs in the productos
sheet are:
In this case, I need the value in the
F12
cell - $6.00. Now, I know that with:
MATCH(D2,$productos.D:D,0) (written in comprasDet)
I can get the row number of "Shampo y Mascarilla Chocolate..." in productos
(12), and with (formula taken from this this post):
LOOKUP(2,1/($productos.12:12<>""),$productos.12:12)
I get actually the last value in the 12th row ($6.00) - the thing is, I need to be able to look for the last price for any given value in comprasDet
, for example, if instead of "Shampo y Mascarilla Chocolate..." I have "Keratina Brasileña (1 lt)" I'll would like to get the F4
value in productos
($7.00).
The sheet productos
will be getting more columns as the prices vary, for example, in the previos print, there were only two price columns (ct20210918 and ct20211001), here is an example with another price modification:
And, in this scenario, the price I need to get from "Shampo y Mascarilla Chocolate..." with a formula inside the comprasDet
sheet will be the value in productos
in cell G12, $8.00.
Note: I know that in excel the notation to reference cell/s in another sheet is Sheet_name!First_cell:Last_cell
, in libreoffice calc changes a little, Sheet_name.First_cell:Last_cell
, but the formulas are pretty much the same.
Thanks in advance.