Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Mar 21, 2019 02:40 PM
Hi!
I would like to use Airtable to do my accounting, but I need a formula that is way above my paygrade, maybe someone here can help?
I have a (single select) column 'deposit/withdrawals" and an amount column where all amounts are positive. I’d like to have the withdrawal amounts show as negative. So I made a third column where I’d like to say “if column 1 says withdrawal, then please give me column 2 amount as -amount, if it says deposit, then please give me column 2 as +amount”.
Maybe that’s not the right way to go (?) but in any case, I’d love some help if possible! Thank you!
Solved! Go to Solution.
Mar 21, 2019 03:48 PM
Hi @Marie_Peze - yes, this is exactly the way to do this. In the 3rd column add a formula field and use this as the formula:
IF({Deposit/Withdrawal} = ‘Withdrawal’, Amount * -1, Amount)
{Deposit/Withdrawal} is your single select column name and if this is set to ‘Withdrawal’ then the 3rd column value is the (amount * -1), otherwise shows the amount (positive).
Hope this helps.
JB
Mar 21, 2019 03:48 PM
Hi @Marie_Peze - yes, this is exactly the way to do this. In the 3rd column add a formula field and use this as the formula:
IF({Deposit/Withdrawal} = ‘Withdrawal’, Amount * -1, Amount)
{Deposit/Withdrawal} is your single select column name and if this is set to ‘Withdrawal’ then the 3rd column value is the (amount * -1), otherwise shows the amount (positive).
Hope this helps.
JB
Mar 21, 2019 10:50 PM
Thank you @JonathanBowen , it works! But why is it not giving me the decimal? :disappointed_relieved:
(I can’t seem to attach a screencap, but pretty much, I’m losing the decimals!)
EDIT: Okay sorry I’m an idiot I just found the formatting tab :rofl:
Mar 22, 2019 06:53 AM
You are not alone, that gets most of us the first time and I think there is at least one post a day about why 3/2=1, as the default number (zero) of decimal places isn’t so good.
Apr 26, 2020 10:32 AM
This base may give you ideas. Accounts - Airtable Universe