Formula

mdz369

New Member
Joined
Jun 2, 2011
Messages
4
I have written the following formula

=IF(A2=10, B9+1,IF(SUM(A2+B2)=10,B10+1))

Basically what I want it to do is increase the value of B9 if A2 equals 10 and increase the value of B10 if A2 and B2 equal 10.

I know I have not written it correctly so I wonder if someone could help me out with this?

Thanks
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I have written the following formula

=IF(A2=10, B9+1,IF(SUM(A2+B2)=10,B10+1))

Basically what I want it to do is increase the value of B9 if A2 equals 10 and increase the value of B10 if A2 and B2 equal 10.

I know I have not written it correctly so I wonder if someone could help me out with this?

Thanks

Try

Code:
=IF(A2=10,(B9+1),IF(SUM(A2+B2)=10,(B10+1)))
 
Upvote 0
I have written the following formula

=IF(A2=10, B9+1,IF(SUM(A2+B2)=10,B10+1))

Basically what I want it to do is increase the value of B9 if A2 equals 10 and increase the value of B10 if A2 and B2 equal 10.

I know I have not written it correctly so I wonder if someone could help me out with this?

Thanks

Where did you put this formula?
 
Upvote 0
That works yes but what it does is increase the value of the cell the formula is in by 1 and not the cells that I want.
 
Upvote 0
B9 needs incrementing if the value in A2 on its own is 10 whereas B10 needs incrementing if the combined total of A2 and B2 are 10
 
Upvote 0
So what is the current value of B9 or B10 whats actually in the cell?

IN B9
=IF(A2=10,1,0) will give you 1 or 0 in B9
in B10
=IF(AND(B9=0,SUM(A2+B2)=10),1,0) will give you 1 or 0 in B10

you can't have a Cell with a formula and a value, and you can't have a cell increment itself, it has to reference something else

B8 = 34
B9 = B8+1 which is value of B8 +1 (35)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,769
Members
452,941
Latest member
Greayliams

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top