Auto Increment in Order No

shafiq247

Board Regular
Joined
Feb 8, 2016
Messages
54
Hi Every One Hope You will be enjoying good health
I'm creating order sheet
I'm stuck on one point on auto increment order no
I have created below formula
=IF(ISTEXT(C2),IF(C2="PinkFit","PF",IF(C2="Gloryshop","GS",IF(C2="Whats App","WA",IF(C2="Website","WEB"))))&"-"&TEXT((COUNTIF($C$1:C1,C2)+1),"0000"),"")
[TABLE="width: 216"]
<colgroup><col width="64" style="width: 48pt;" span="3"> <col width="96" style="width: 72pt; mso-width-source: userset; mso-width-alt: 3510;"> <tbody>[TR]
[TD="width: 64, bgcolor: transparent"]Order_Id
[/TD]
[TD="width: 64, bgcolor: transparent"]Source
[/TD]
[TD="width: 64, bgcolor: transparent"] Customer Name
[/TD]
[TD="width: 96, bgcolor: transparent"] PhoneNo
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]WEB-0001
[/TD]
[TD="bgcolor: transparent"]Website[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]0322895xxx
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]PF-0001[/TD]
[TD="bgcolor: transparent"]PinkFit
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]PF-0002[/TD]
[TD="bgcolor: transparent"]PinkFit[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]PF-0003[/TD]
[TD="bgcolor: transparent"]PinkFit[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]GS-0001[/TD]
[TD="bgcolor: transparent, colspan: 2"]GloryShop[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]PF-0004[/TD]
[TD="bgcolor: transparent"]PinkFit[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]PF-0005[/TD]
[TD="bgcolor: transparent"]PinkFit[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]GS-0002[/TD]
[TD="bgcolor: transparent, colspan: 2"]GloryShop[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]PF-0006[/TD]
[TD="bgcolor: transparent"]PinkFit
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
Now I want to edit formula, if the phone no in above cell is same then don't increase in order no
hope you understand
 

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

Forum statistics

Threads
1,226,730
Messages
6,192,708
Members
453,748
Latest member
akhtarf3

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