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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,223,315
Messages
6,171,416
Members
452,401
Latest member
Stereonix

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