Google Sheet Formula: Preventing the serial number of duplicates below to go up (Using Countif)

omcsarayar

New Member
Joined
Oct 20, 2022
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
I'm currently struggling to assign serial number to a series of dynamic data in google spreadsheet.

for example, i have this table below

ProductSerial Number
Apple1
Orange1
Lemon1
Banana1
Apple2
Melon1
Lemon2
Orange2
Banana2
Apple3

currently on column B i'm using the formula
Excel Formula:
=COUNTIF($A$1:A1,A1)

But the problem is, when i change the product on column A to another, the serial number of the duplicates below will automatically go up. for instance, if i change the 2nd Apple to Orange, the serial number of the last apple will automatically go up to 2.

i'd like the serial number of duplicates below to not be changed because it will be sent to the customer (i hope i'm making sense).

is there a way for me to do this?
any help will be much appreciated.
 

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

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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