Increment values only when there is a zero in a cell

leenux_tux

New Member
Joined
Aug 28, 2008
Messages
19
Hello Forum,

Hopefully someone has some pointers on this. Normally I can figure out little problems like this but this one has got me stumped. Obviously my Excel skill are not as good as I thought they were !!

Here is my challenge...

I have a set of numbers which are grouped, sometimes there is only one, sometimes 2, sometimes 3 sometimes 5. Some example data...

COLUMN A
0
0
1
0
1
2
3
4
5
0
1
2

In column b I want to do this...
COLUMN A, COLUMN B
0 1
0 2
1 2
0 3
1 3
2 3
3 3
4 3
5 3
0 4
1 4
2 4

I cannot for the life of me figure out a formulae that will auto-populate this for me. Any pointers would be greatly appreciated.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Thanks for the fast response, works perfectly. I have used this formulae loads of times before so now I really feel stupid. !!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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