Calc - Sum colon range - not working

I have an invoicing spreadsheet - all relevant cells are formatted as currency (Calc is version

I have a cell with a reference to a sum in another worksheet (B4) in the same workbook,
and I have a short column of cells (invoices paid to date) which I want to sum and then subtract their total from the reference cell (the original quote). For some reason

=SUM(B4-($B$5:$B7)) fails

I’ve seen similar questions on the web from 2010, with no happy answers - if i cant solve this I’ll have to go back to the Seattle solution - has anyone else had this and what was your solution?

Move the reference to B4 out of the SUM function:


Thanks very much rveerd, that solved my problem and worked perfectly