I'm entering details of English personal accounts from 17th & 18th centuries. I convert amounts into farthings (£1=960; 1s=48; 1d=4), and can add them up in farthings: I do this for credit and debit totals, and subtract debit from credit to get a balance which I then reconvert back to
£sd.
The procedure for reconversion (got from a friendly forum for Fmpro) is
£=trunc farthings/960; and I store mod (farthings, 960) in a cell (let's say A57)
s=trunc A57/48; and the mod (A57, 48) goes into A58
d=trunc A58/4
f = mod( A58, 4)
That all works fine, except when debit is greater than credit: the person owes money.
the trunc/mod procedure gives a negative figure for the ££, but the mod(farthings, 960) records as a positive. And the arithmetic for ss and dd appears to go haywire.
So the question is: how can I get a negative balance to reconvert accurately?
All help gratefully received.
Bookmarks