Serial Number Logic

Shushant27

New Member
Joined
Dec 15, 2016
Messages
3
Hello,

I am trying to have a serial number logic, as below:-


Sr. No.Code
1AB005
AB005
2AB006
3AB007
AB007
4AB008

<colgroup><col><col></colgroup><tbody>
</tbody>


Column 1 is Sr. No., Column 2 is Code Number.
Now, I am need that Sr. no. should ignore while dragging, if the cell next to it is same as the cell above it.

please help/ suggest some trick/ logic

Shushant
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I want to have serial numbers, based on the "Code" Column.

Sr. No. Should go 1,2,3......, but if cell in the "Code" column is same as above it like in example: AB005 comes 3 times. Then it should consider it only once in the serial number.


Sr. No.Code
1AB005
AB005
2AB006
3AB007
AB007
4AB008

<tbody>
</tbody>


 
Upvote 0
Try this in A2 copied down:

=IF(B2=B1,"",COUNT(A$1:A1)+1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,256
Messages
6,123,914
Members
449,132
Latest member
Rosie14

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