Jul 02 2020 08:11 PM
Hi all,
I am setting up a spreadsheet to monitor the fuel storage/usage for a transport company. If no amounts have been entered into the spreadsheet (i.e small tank, big tank etc.), I would like to show the usage cell as zero, but cannot get the formula correct. I entered the formula =sum(E3-E4) to give me the usage, but that creates it's own problems where there a zero in the following cell.. All help is appreciated.
Jul 02 2020 08:48 PM
@Chris_Van_Malsem The formula could be:
=IF(E5<>0,E4-E5,0)
or
=(E4-E5)*--(E5<>0)
if you like it to be a bit more "funky".
Jul 02 2020 10:00 PM - edited Jul 02 2020 10:07 PM
@Riny_van_Eekelen Sorry to be a pain, but if I was to add an amount in the delivery column that then was included in the total, how can I change the formula to take that delivery amount out of the calculation for the amount used? I hope that I've explained that well enough.
Jul 02 2020 10:14 PM
Assuming you fill in the delivered quantity (in G) as a positive number, the formula would be like this:
=IF(E5<>0,E4-E5+G5,0)
Please see the attached example, replicating your worksheet.