How to number rows, skip blanks and then ...

pingvin

New Member
Joined
Oct 28, 2017
Messages
15
Hi,

I have a small problem. I have 3 colums A, B and C.
In col A I have Family serial number. All parts in the same family have the same serial number.
In col B I have sub serial numbers. Each sub part has it's own designated serial number.
In col C I would like Excel to number each row/sub part in the same family. However blank cells should be skipped.

Col A
Col BCol C
5555
5555
321
1
5555
3252
5555
5493
8888
88886491
8888821
2
2222
22221831
22222432
22227643

<colgroup><col style="width:54pt" span="3" width="72"> </colgroup><tbody>
</tbody>

I have tried this formula IF(A2=A1,C1+1) But the problem is that it doesn't skip blank cells, so it ends up numbering blank cells or generating "FALSE".
I have also tried IF(AND(B1>0,A2=A1),C1+1,"") but neither of the formula does what I would like to.
Can anybody help me with this problem.
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,245
Office Version
  1. 365
Platform
  1. Windows
This requires your data starting in row 2, ie the first 5555 in A2, and the data is sorted like in the example. In C2 place this:

=IF(A2=A1,(B2<>"")+IF(ISNUMBER(C1),C1,0),"")
 

Watch MrExcel Video

Forum statistics

Threads
1,122,519
Messages
5,596,634
Members
414,082
Latest member
sasmita

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
Top