Number sequence formula?

adavies

Board Regular
Joined
Nov 15, 2005
Messages
61
Hi All,

I am trying to figure out a number sequence formula.

Here's how the sheet will look

A1 = Name
B1 = number sequence (2,4,B (repeat))

However B1 will reference A1 and if it is blank it will not input a sequence number (2,4,B) It will be left blank, but the next line should carry on where the sequence left off.

What would be the best formula to use for this?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
It worked when I tried it. Make sure you paste the formula from my post.

=IF(ISBLANK(A1),"",LOOKUP(MOD(COUNTA(A$1:A1),3),{0,"B";1,2;2,4}))

You do have the comma as the list separator don't you?
 
Upvote 0
Yes my mistake I entered the formula incorrectly. It works but A8 is blank but it is still showing a number?
 
Upvote 0
A8 is not truly blank as it has a formula in that cell but there is nothing else other than the formula... is there a way it could ignore the formula in that cell? Because as soon a I delete the formula it works fine and dandy - and I need that formula left there
 
Upvote 0
Modifying Andrew's formula:

If the blank cells have formulas returning "", or are actually blank, then try B1 (copied down):
=IF(A1="","",LOOKUP(MOD(COUNTIF(A$1:A1,">=A"),3),{0,"B";1,2;2,4}))
Mr Excel.xls
ABCD
1John2
2bob4
3  
4ChrisB
5Jen2
6Roger4
7 
8TrishB
9
2 4 B
 
Upvote 0
Also try:

=IF(A1="","",LOOKUP(MOD(SUMPRODUCT(--(A$1:A1<>"")),3),{0,"B";1,2;2,4}))

which will cater for "" values returned by a formula.
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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