libraCalc Formula help plzzz

i have a drop down list in column A3 with a few items . i wanna enter a value in column a5 and then on a different sheet i would like the value i added to be added to the correct item that was selected in the drop down list . So i select bananas from list. i then enter a value in a5 and it must then update a stock sheet i have created … Any ideas on how to do this .?

Do you mean simple =$Sheet1.$A$5 ?

If you have the dropdown items in Column A of Sheet2, then add this formula in Column B of Sheet2.

=HLOOKUP(A1,Sheet1.A3:A5,3,0)

What you describe is not possible using cell formula. A cell formula can only change the value in the cell that contains that formula.

It might be possible to write a user defined function that would change some other cell value but this is not recommended and could possibly cause LibreOffice to crash.

The best method to achieve what you describe would be to create a macro that would execute from a button located on your data entry sheet, which would find the location of A3 in your stock sheet and add the value from A5 to the balance.

Demo example in attached Untitled 35.ods