Jump to content

How to add numbers by categories in Excel?

GamerGry123

I have sold and bought cells. I have to subtract sold from purchased to know what the profit is. There are several dozen transactions, so adding them manually will take a long time, and besides, there may be an error while adding them manually.

 

How to make Excel automatically add sold and purchased cells? And then subtract the purchased from the sold?

I tried to do it somehow, you can see in the video but it doesn't add everything.

 

Zrzut ekranu 2023-10-02 120925.jpg

Link to comment
Share on other sites

Link to post
Share on other sites

Based on the video it's trying to add the count, not the sum.  Try clicking on "Count of Fiat Amount" to see if you can change it to value.

 

You could also try highlighting the row and converting it to currency if it's not an option

 

Another option you could try

https://support.microsoft.com/en-us/office/sumif-function-169b8c99-c05c-4483-a712-1697a653039b

 

 

sumif(condition_range, condition, row_to_add)

 

so in your case

sumif(B:B, "=SELL", C:C)

sumif(B:B, "=BUY", C:C)

 

I think that should work

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

You've asked this question here already. And I already answered. First, you need to convert all those cells into actual numbers. The green triangles in the corners of those cells mean that Excel recognizes that they're numbers but they're entered as text and it's letting you know that by highlighting the cells with that green triangle. Follow the steps outlined in this post:

 

 

The problem you're showing in your video is that the PivotTable simply counts the instances of where it says "buy" or "sell", instead of adding up the values, because they're not formatted as numbers. Every cell in that sheet that has the green triangle isn't a number, it's text. Use the aforementioned steps to fix that, because I have a hunch you'll be asking the same questions a third time if you don't.

 

Next, create the pivot table as described in this post.

And now a word from our sponsor: 💩

-.-. --- --- .-.. --..-- / -.-- --- ..- / -.- -. --- .-- / -- --- .-. ... . / -.-. --- -.. .

ᑐᑌᑐᑢ

Spoiler

    ▄██████                                                      ▄██▀

  ▄█▀   ███                                                      ██

▄██     ███                                                      ██

███   ▄████  ▄█▀  ▀██▄    ▄████▄     ▄████▄     ▄████▄     ▄████▄██   ▄████▄

███████████ ███     ███ ▄██▀ ▀███▄ ▄██▀ ▀███▄ ▄██▀ ▀███▄ ▄██▀ ▀████ ▄██▀ ▀███▄

████▀   ███ ▀██▄   ▄██▀ ███    ███ ███        ███    ███ ███    ███ ███    ███

 ██▄    ███ ▄ ▀██▄██▀    ███▄ ▄██   ███▄ ▄██   ███▄ ▄███  ███▄ ▄███▄ ███▄ ▄██

  ▀█▄    ▀█ ██▄ ▀█▀     ▄ ▀████▀     ▀████▀     ▀████▀▀██▄ ▀████▀▀██▄ ▀████▀

       ▄█ ▄▄      ▄█▄  █▀            █▄                   ▄██  ▄▀

       ▀  ██      ███                ██                    ▄█

          ██      ███   ▄   ▄████▄   ██▄████▄     ▄████▄   ██   ▄

          ██      ███ ▄██ ▄██▀ ▀███▄ ███▀ ▀███▄ ▄██▀ ▀███▄ ██ ▄██

          ██     ███▀  ▄█ ███    ███ ███    ███ ███    ███ ██  ▄█

        █▄██  ▄▄██▀    ██  ███▄ ▄███▄ ███▄ ▄██   ███▄ ▄██  ██  ██

        ▀███████▀    ▄████▄ ▀████▀▀██▄ ▀████▀     ▀████▀ ▄█████████▄

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×