I need a basic total sum that caps at 10000

I have a column listing mileage that is tax deductible at 45pence per mile up to 10k. I have cell which totals the column, but would like it to stop at 10000, and I have a neighbouring cell that is already working out the pence per mile on the difference. If anyone could tell me how to create a normal sum function but cap it, I'd be grateful.

Thanks

Hi

Here, try this

assuming the numbers that need to be summed are in column D

=SUMIF(D:D,"<=" & "10000")

Hope this helps