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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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,224,828
Messages
6,181,204
Members
453,022
Latest member
RobertV1609

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