Yes. However, I do not think this is a legitimate FIFO accounting practice.
The correct formula is:
Beginning Inventory + Net Purchases - Ending Inventory = Cost of Goods Sold
Transaction 1 through 3 would give you:
0.00 + (5 (1.00) + 5 (1.50) + 10 (1.75)) - 0(0.00) = 30.00
Transaction 4 would give you:
30.00 + 0.00 - (1(1.00) + 5(1.50) + 10(1.75)) = 4.00
Transaction 5 would give you:
26.00 + 0.00 - ( 4(1.50) + 10 (1.75)) = 2.50
Transaction 6 would give you:
23.50 + 0.00 - ( 9(1.75)) = 7.75
A seventh transaction could be:
7 2006-07-30 Sale -9
Transaction 7 would give you:
15.75 + 0.00 - 0(0.00) = 15.75
However, even this is not valid FIFO. For FIFO do not concern yourself with cost per transaction at all. Unless you make a physical confirmation of the inventory after every transaction. If you are making a purely analytical tool; you can break the rules all you want, but you cannot depend on the results matching the true inventory.
In normal practice a physical inventory would be taken at the end of each accounting period giving us the following after Transaction 6:
Sales --(11@2.00)-----------------------------$22.00
Inventory 01/01/07------00.00
Purchases---------------30.00
Cost of Goods Sold-----------------------30.00
Less:FIFO Inventory 12/31/07--(9@1.75)--15.75
Net Cost of Goods Sold-------------------------$14.25
Gross Profit on Sales---------------------------$07.75