[Solved] Formula for checking one column and adding another

Discuss the spreadsheet application
Post Reply
crusch
Posts: 2
Joined: Sat May 12, 2018 7:16 pm

[Solved] Formula for checking one column and adding another

Post by crusch »

Hello,
I am trying to set up formula that will check the values in one column and then sum the balance in another column.
For example:

If E3 reads 1 then add B3.

But I want it to read every row in column E and add all the corresponding numbers from those rows in column B.
Last edited by crusch on Sat May 12, 2018 7:43 pm, edited 1 time in total.
OpenOffice 4.1.5 on MacOS 10.13.4
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: IF THEN Formula for checking one column and adding anoth

Post by FJCC »

Use the SUMIF() function

Code: Select all

=SUMIF(E2:E11;1;B2:B11)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
crusch
Posts: 2
Joined: Sat May 12, 2018 7:16 pm

Re: IF THEN Formula for checking one column and adding anoth

Post by crusch »

That worked. Thank you so much!
OpenOffice 4.1.5 on MacOS 10.13.4
User avatar
IsabelDalhousie
Posts: 20
Joined: Thu Aug 10, 2017 2:12 am

Re: Formula for checking one column and adding another

Post by IsabelDalhousie »

Is it possible to look up first column for a category code, say the first column identifies category X, Y or Z. then I want the second column to use that category code in a conditional sum ...i tried this in my cell B1

sumif(A10:A1000;"X";B10:B1000)

hoping the sum of B10:B1000 would add only those values where column A rows show category X

I'm missing something ... would appreciate any assist!
Apache OpenOffice 4.1.5 running on macOS High Sierra 10.13.6 Arizona time zone
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: [Solved] Formula for checking one column and adding anot

Post by FJCC »

Your formula should work. See the attached for an example. What value are you getting on your data? Is it zero or are all numbers being summed?
Attachments
SUMIF.ods
(9.94 KiB) Downloaded 56 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
IsabelDalhousie
Posts: 20
Joined: Thu Aug 10, 2017 2:12 am

Re: [Solved] Formula for checking one column and adding anot

Post by IsabelDalhousie »

I tried again and it worked! Thanks for giving encouragement FJCC
Apache OpenOffice 4.1.5 running on macOS High Sierra 10.13.6 Arizona time zone
Post Reply