Formula to number sequentially

Arts

Well-known Member
Joined
Sep 28, 2007
Messages
782
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi all

I have a list of items that needs numbering (goes down quite a way) but I can't seem to find a formula to number each item as there is a gap after each line.

example below (which I did manually for the first few) there is always number against text then a blank row then number... I tried a few ways using sequence and counta but cant seem to get it to number sequentially. I don't mind putting the formula in helper column and then pasting over if that makes it easier

Thanks as always

on excel 365



1 Text Text
2 Text Text
3 Text Text
4 Text Text
5 Text Text
6 Text Text
 
I think what you're attempting to do is generate a sequence of 1 row and each sequence starts with the COUNTA() like this, however, a sequence with 1 row is the same as Option #2 in post #3.
Book2
ABC
1Option3Header1Header2
21TextText
3 
42TextText
5 
63TextText
7 
84TextText
9 
105TextText
11 
126TextText
Sheet1
Cell Formulas
RangeFormula
A2:A12A2=IF(B2="","",SEQUENCE(1,,COUNTA($B$2:B2)))
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Adding MAX will eliminate the repeated values as you drag the formulas down i.e. MAX(1) = 1; MAX(1,2) = 2; MAX(1,2,3) =3; ect...

Thank you for that explanation!

You are completely right in what I was trying to achieve and the formulas you provided were perfect. I was looking at the formula Hagia provided (and Fluff slightly shortened) in the hope of understanding them but then you provided =IF(C2="","",COUNTA($C$2:C2)) which I thought was brilliant in that it seemed easier to understand (at least me to me, not taking anything anyway from Hagia's solution) It's amazing when people can create formulas like that (hats of to them) but when I saw yours I was quite pleased as that seemed easier to breakdown so thank you once again!
 
Upvote 0

Forum statistics

Threads
1,224,545
Messages
6,179,432
Members
452,915
Latest member
hannnahheileen

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