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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
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
[TABLE="width: 1216"]
<colgroup><col width="64" span="19" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 64"]7[/TD]
[TD="class: xl63, width: 64"]21[/TD]
[TD="class: xl63, width: 64"]25[/TD]
[TD="class: xl63, width: 64"]33[/TD]
[TD="class: xl63, width: 64"]36[/TD]
[TD="class: xl63, width: 64"]40[/TD]
[TD="class: xl63, width: 64"]38[/TD]
[TD="class: xl63, width: 64"]7[/TD]
[TD="class: xl63, width: 64"][/TD]
[TD="class: xl64, width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="class: xl64, width: 64"][/TD]
[TD="class: xl64, width: 64"][/TD]
[TD="class: xl64, width: 64"]Winning no's[/TD]
[TD="class: xl64, width: 64"]Bonus Ball[/TD]
[TD="class: xl64, width: 64"][/TD]
[TD="class: xl64, width: 64"][/TD]
[TD="class: xl64, width: 64"][/TD]
[/TR]
[TR]
[TD="class: xl63"]2[/TD]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]3[/TD]
[TD="class: xl63"]8[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]27[/TD]
[TD="class: xl63"]8[/TD]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]5[/TD]
[TD="class: xl63"]8[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]1[/TD]
[TD="class: xl64"]6[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Lotto 1[/TD]
[TD="class: xl64"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]16[/TD]
[TD="class: xl63"]21[/TD]
[TD="class: xl63"]12[/TD]
[TD="class: xl63"]17[/TD]
[TD="class: xl63"]6[/TD]
[TD="class: xl63"]29[/TD]
[TD="class: xl63"]12[/TD]
[TD="class: xl63"]11[/TD]
[TD="class: xl63"]9[/TD]
[TD="class: xl63"]13[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]2[/TD]
[TD="class: xl64"]5[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Lotto 2[/TD]
[TD="class: xl64"]3[/TD]
[/TR]
[TR]
[TD="class: xl63"]20[/TD]
[TD="class: xl63"]25[/TD]
[TD="class: xl63"]26[/TD]
[TD="class: xl63"]21[/TD]
[TD="class: xl63"]12[/TD]
[TD="class: xl63"]32[/TD]
[TD="class: xl63"]16[/TD]
[TD="class: xl63"]17[/TD]
[TD="class: xl63"]13[/TD]
[TD="class: xl63"]18[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]3[/TD]
[TD="class: xl64"]5[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Lotto 3[/TD]
[TD="class: xl64"]4[/TD]
[/TR]
[TR]
[TD="class: xl63"]31[/TD]
[TD="class: xl63"]33[/TD]
[TD="class: xl63"]30[/TD]
[TD="class: xl63"]25[/TD]
[TD="class: xl63"]18[/TD]
[TD="class: xl63"]34[/TD]
[TD="class: xl63"]22[/TD]
[TD="class: xl63"]23[/TD]
[TD="class: xl63"]17[/TD]
[TD="class: xl63"]23[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]4[/TD]
[TD="class: xl64"]4[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Lotto 4[/TD]
[TD="class: xl64"]5[/TD]
[/TR]
[TR]
[TD="class: xl63"]35[/TD]
[TD="class: xl63"]36[/TD]
[TD="class: xl63"]33[/TD]
[TD="class: xl63"]31[/TD]
[TD="class: xl63"]28[/TD]
[TD="class: xl63"]37[/TD]
[TD="class: xl63"]28[/TD]
[TD="class: xl63"]29[/TD]
[TD="class: xl63"]21[/TD]
[TD="class: xl63"]28[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]5[/TD]
[TD="class: xl64"]4[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Lotto 5[/TD]
[TD="class: xl64"]6[/TD]
[/TR]
[TR]
[TD="class: xl63"]38[/TD]
[TD="class: xl63"]40[/TD]
[TD="class: xl63"]38[/TD]
[TD="class: xl63"]35[/TD]
[TD="class: xl63"]29[/TD]
[TD="class: xl63"]39[/TD]
[TD="class: xl63"]34[/TD]
[TD="class: xl63"]35[/TD]
[TD="class: xl63"]27[/TD]
[TD="class: xl63"]33[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]6[/TD]
[TD="class: xl64"]3[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Lotto 6[/TD]
[TD="class: xl64"]7[/TD]
[/TR]
[TR]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]9[/TD]
[TD="class: xl63"]7[/TD]
[TD="class: xl63"]8[/TD]
[TD="class: xl63"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]7[/TD]
[TD="class: xl64"]3[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Lotto 7[/TD]
[TD="class: xl64"]8[/TD]
[/TR]
[TR]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]6[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]2[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Power Ball[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[/TR]
[TR]
[TD="class: xl63"]1[/TD]
[TD="class: xl65"]0[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]1[/TD]
[TD="class: xl64"]6[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Power 1[/TD]
[TD="class: xl64"]10[/TD]
[/TR]
[TR]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]1[/TD]
[TD="class: xl63"]0[/TD]
[TD="class: xl63"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]2[/TD]
[TD="class: xl64"]5[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Power 2[/TD]
[TD="class: xl64"]11[/TD]
[/TR]
[TR]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]Lotto 1[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]3[/TD]
[TD="class: xl64"]5[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Power 3[/TD]
[TD="class: xl64"]12[/TD]
[/TR]
[TR]
[TD="class: xl66"][/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD="class: xl66"]FALSE[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]4[/TD]
[TD="class: xl64"]4[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Power 4[/TD]
[TD="class: xl64"]13[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]5[/TD]
[TD="class: xl64"]4[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Power 5[/TD]
[TD="class: xl64"]14[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]6[/TD]
[TD="class: xl64"]3[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Power 6[/TD]
[TD="class: xl64"]15[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl64"]Division [/TD]
[TD="class: xl64"]7[/TD]
[TD="class: xl64"]3[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"]Yes[/TD]
[TD="class: xl64"]Power 7[/TD]
[TD="class: xl64"]16[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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