help w/ if statement

micfly

Well-known Member
Joined
Sep 8, 2008
Messages
543
If any of these cells contains a "15" add them up as ones F8:F15

So...

F8 15
F9
F10
F11 15
F12
F13 15
F14
F15

F20 (formula) 1+1+1 =3

i can do it one cell at a time but how do I add them up?: =IF(F8=15,1,)
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi,

You would use COUNTIF:


Book1
F
815
9
10
1115
12
1315
14
15
16
17
18
19
203
Sheet386
Cell Formulas
RangeFormula
F20=COUNTIF(F8:F15,15)
 
Upvote 0

Forum statistics

Threads
1,217,362
Messages
6,136,106
Members
449,993
Latest member
Sphere2215

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