Forum Discussion

John1944's avatar
John1944
Copper Contributor
Mar 12, 2024

excell

If I have downloaded bank statements for a 12 month period how

do I transfer all negative amounts into a separate column?

 

  • John1944 

    A 365 formula that amused me.  Basically it creates a copy of the amounts with reversed signs and then selected the positive values.

    = LET(
        signed, {1,-1}*amounts,
        IF(signed>0, signed, "")
      )

    The idea would work without 365 

    = IF({1,-1}*amounts>0, {1,-1}*amounts, "")

    but I like seeing the LET function

     

  • mathetes's avatar
    mathetes
    Silver Contributor

    John1944 

     

    Could I ask what you are planning to do with the data?

     

    I ask because I also download bank statements and credit card statements, all into a single comprehensive database where I then assign budget categories. Some items are income (typically positive from the bank/credit card); some are expense (typically, but not always, negative). And there are subcategories by type of income, type of expense. But I emphasized that "but not always" regarding credit card statements because I've realized credit card companies don't all follow the same convention. So I approach that a different way, as described below.

     

    I have a special column that only after I've slotted the entry into income or expense makes sure that all expenses are negative, all incomes are positive. That way I can easily create a Pivot Table that summarizes all items on a month-by-month basis, category-by-category basis and the grand total automatically subtracts all expenses from all incomes, easy because they're all in a single column.

  • SnowMan55's avatar
    SnowMan55
    Bronze Contributor

    John1944 

    You did not mention which column currently contains your (transaction) amounts. I will assume they are in column C, and that row 1 contains column headings.


    Start by inserting two columns to the right of column C. (Of course, that's not necessary if column C is the last-used column.)  Then, into cell D2 place this formula:

    =IF(C2 < 0, "", C2)

    and into cell E2 place this formula:

    =IF(C2 < 0, C2, "")

    (Or swap those two formulas if you want negative values in column D.)

     

    Copy those formulas to rows below, at least as far down as needed for your data.

     

    Because formulas determine values (but not formatting), format the newly-populated cells as you desire (for example, as Currency).


    Now that everything (presumably) looks right, select all the newly-populated cells and copy them. Without changing the selection, paste their values into those same cells (thereby replacing the formulas); you can (probably) do that by right-clicking any of the selected cells and choosing Paste Values from the popup menu that appears:

    (You can alternatively do that pasting from the Paste Special dialog.)


    Do things still look right? Examine some newly-populated cells.  Do they now contain values (rather than formulas)?  Is column C now useless?  If so, you can delete column C.

Resources