[Solved] Convert CSV with Credit/Debit to signed numbers

Discuss the spreadsheet application
Locked
AndrewB1
Posts: 2
Joined: Sun Feb 02, 2025 3:46 pm

[Solved] Convert CSV with Credit/Debit to signed numbers

Post by AndrewB1 »

How can I get this sheet to update the currency to a positive or negative from the last column that states if it's a credit or debit amount? Quickbooks doesn't seem to have the ability to use that column.... Really wondering how they can't, it's PNC, not some random bank.

Date         Amount  Description                                    Description 2                    Check Number       Credit or Debit
2024/01/02     96.8  Corporate ACH Transfer Stripe St-D7D9R6A5B9W3                                   00024002908004472  CREDIT
2024/01/02  1558.34  Corporate ACH Txns/Fees                        Hrtland Pmt Sys 650000011982934  00024002908265841  DEBIT
Last edited by MrProgrammer on Sun Feb 09, 2025 6:50 pm, edited 2 times in total.
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4
AndrewB1
Posts: 2
Joined: Sun Feb 02, 2025 3:46 pm

Re: Fix a bank CSV that has "credit or debit" rather than "-" numbers

Post by AndrewB1 »

I just sorted by that column and pasted the amounts into the credit or debit column
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Fix a bank CSV that has "credit or debit" rather than "-" numbers

Post by Hagar Delest »

Hi and welcome to the forum!

You need an additional column after Credit or Debit for example and do an IF test: =IF(F2="CREDIT";B2;-B2).
Meaning that the string in the F column must be CREDIT or DEBIT but nothing else. If not, then add the condition to check for DEBIT and return -B2 and if both tests fail, then return "" or 0.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Locked