Add value to one cell if multiple other cells have any value [Solved/Closed]

Posts
6
Registration date
Friday April 18, 2014
Last seen
April 21, 2014
- - Latest reply: alonsy
Posts
6
Registration date
Friday April 18, 2014
Last seen
April 21, 2014
- Apr 21, 2014 at 10:39 PM
Hello,

I'm trying to create a spreadsheet where:

if A1 has any value, 10 is added to the total sum in G1
if B1 has any value, 20 is added to the total sum in G1
if C1 has any value, 30 is added to the total sum in G1

etc.

I think I should be using SUMIFS, but I'm not sure. Thanks.


See more 

2 replies

Posts
10939
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 14, 2018
0
Thank you
Hang in there, two questions:

What is already in G1? Is it a formula, or is it an integer input by the user?

Let us know!
alonsy
Posts
6
Registration date
Friday April 18, 2014
Last seen
April 21, 2014
-
Nothing's in G1. It's a blank cell in a column that is going to hold totals

Thanks.
ac3mark
Posts
10939
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 14, 2018
-
Ok, I read total, and thought it was already holding a value.....
ac3mark
Posts
10939
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 14, 2018
-
the formula for if is as follows, and you can nest ifs:

=IF(logic_test,true,false)

You can also do something like:
=IF(logic_test,IF(LOGIC_TEST,true,false),false)

So what shouldl the output be if all of them have a number?

Would the output be 60?
alonsy
Posts
6
Registration date
Friday April 18, 2014
Last seen
April 21, 2014
-
If A1, B1 and C1 all have values in them, then yes, G1 should read 60
If only A1 has a value, then G1 should only read 10.

etc.
Posts
10939
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 14, 2018
0
Thank you
Do you have the liberty of this?

alonsy
Posts
6
Registration date
Friday April 18, 2014
Last seen
April 21, 2014
-
Sorry, I'm not sure what this is...
ac3mark
Posts
10939
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 14, 2018
-
Well, that is a screen shot of your solution. If you cannot reverse engineer your final product from this, then wait around and see if someone else in the forum can possible make it more simple. I am sorry I cannot communicate the answer to you.

If you look at the above picture, wou will see three columns, colum a has the values to check for. Column b is the actual formulas that give the valuesYOU PROVIDED IF THERE IS A VALUE IN EACH CORISPONDING CELL. SO FOR EXAMPLE-if a1>0 then 10, if b1>0 then 20, and if c1>0 then 30 = 60. G1 formula is displayed in the picture. as is the formulas for building whehter or not a1, b1, or c1, has values.
alonsy
Posts
6
Registration date
Friday April 18, 2014
Last seen
April 21, 2014
-
Thank you! I got it figured out.
ac3mark
Posts
10939
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 14, 2018
-
I am very glad.. I hate to aske this, but can you mark as solved?
alonsy
Posts
6
Registration date
Friday April 18, 2014
Last seen
April 21, 2014
-
Sure, thanks again!