I got in trouble with formulas.
All good but if A1 is Prime number then I get only 2 values, 0 and itself
So I want to keep formulas above BUT if A1 is Prime number then B1=2
So like if A1 is 11, results would be
0
2
4
6
8
10
1
I'm not following any of that really! Maybe the others will, or perhaps you can have another go at explaining it or give a few more examples of different inputs and their expected outputs.
I agree. That new pattern doesn't match your original post. Why did your pattern end in 1, and not 11?
What does a prime number have to do with anything?
The only way that I would see that you would get 0 and the number in A1 is if was equal to the number in B1.
A1:5
B1:5
but this has nothing to do with prime numbers only that they are equal.
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.