Cell must have number before it is counted

Shoota

New Member
Joined
Jan 29, 2019
Messages
3
Hi All, I have lotto numbers totaled in A9-Lotto, A10-Bonus Ball, and A11-Power Ball. If cell A9 has 3, A10 has 1, A11 has 1 a total of 5. This would give me a prize of Power Ball 6 if counted as each cell, Because the total is 5 it could also be Power Ball 5 as that would be 4 Lotto and 1 Power Ball. I currently have this formula that would cover these cells. IF(B9+B11=5,$O$14,IF(B9+B10+B11=5,$O$15, ($O$14 shows Power 5 and $O$15 shows Power 6) I would like a formula that must count each cell as individual to get different results from 2 cell counts or 3 counts. Thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Does this work?

=IF((B9+B11)*(B9<>0)*(B11<>0)=5,$O$14,IF((B9+B10+B11)*(B9<>0)*(B10<>0)*(B11<>0)=5,$O$15))

So if B9+B11 = 5 AND B9 or B11 are zero the IF will fail then

If B9+B10+B11 = 5 AND B9 is zero or B10 is zero or B11 is zero the if will fail
 
Last edited:
Upvote 0
Does this work?

=IF((B9+B11)*(B9<>0)*(B11<>0)=5,$O$14,IF((B9+B10+B11)*(B9<>0)*(B10<>0)*(B11<>0)=5,$O$15))

So if B9+B11 = 5 AND B9 or B11 are zero the IF will fail then

If B9+B10+B11 = 5 AND B9 is zero or B10 is zero or B11 is zero the if will fail


Hello K99, Do you know if different years of excel make any difference, mine is 2016. It did not work on my sheet. I have attached the whole sheet to see if you may see something else that will solve the formula. Top you can see a formula from another helper on MrExcel. Thank You, Maurice

HelperSergio, =IF(NOT(A12),"",IF(A9+A11=7,$O$10,IF(A9+A10+A11=7,$O$11,IF(A9+A11=6,$O$12,IF(A9+A10+A11=6,$O$13,IF(A9+A11=5,$O$14,IF(A9+A10+A11=5,$O$15,IF(A9+A11=4,$O$16))))))))

These are my existing formulas, This seems to work ok.
Lotto, =IF(B9=6,$R$2,IF(B9+B10=6,$R$3,IF(B9=5,$R$4,IF(B9+F10=5,$R$5,IF(B9=4,$R$6,IF(B9+B10=4,$R$7,IF(B9=3,$R$8)))))))

PowerBall, =IF(C9+C11=7,$R$10,IF(C9+C10+C11=7,$R$11,IF(C9+C11=6,$R$12,IF(C9+C10+C11=6,$R$13,IF(C9+C11=5,$R$14,IF(C9+C10+C11=5,$R$15,IF(C9+C10+C11=4,$R$16)))))))
A B C D E F G H
72125333640387Winning no'sBonus Ball
27381278758Division 16Lotto 12
162112176291211913Division 25YesLotto 23
20252621123216171318Division 35Lotto 34
31333025183422231723Division 44YesLotto 45
35363331283728292128Division 54Lotto 56
38403835293934352733Division 63YesLotto 67
7777779787Division 73Lotto 78
0612000111Power Ball
1010000000Division 16YesPower 110
1111110101Division 25YesYesPower 211
FALSELotto 1FALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEDivision 35YesPower 312
FALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEDivision 44YesYesPower 413
Division 54YesPower 514
Division 63YesYesPower 615
Division 73YesPower 716

<colgroup><col width="64" span="19" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,104
Members
449,205
Latest member
ralemanygarcia

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