IF + COUNT IF

jon09

New Member
Joined
Jan 25, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
I have data in col A (item) I need to know if it is repeat or new.
the thing is, all item starts with 302 are new (N) item number, but if this item is repeating(starts with 302), I have to tag it as Repeat (R).

i have the formula to find if it is repeating.
=IF(COUNTIF($A$1:A1,A1)=1,"N","R")
but I also need to combine the formula to know if it starts with "302"
=IF(LEFT(A1,3)="302","N","R")

1643164200106.png


in this image, item starts with 11, but it says N, i need to create a formula which tells me that if item begins with 302 this is new, but if it is duplicated it should be tag as repeat. while all item that dont starts with 302 should be tagged as "R".

SORRY FOR MY ENGLISH.
hope someone can understand it and help me.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi,

Not sure I understand fully, is this what you mean:

Book3.xlsx
AB
1302aN
211bR
3302cN
4302aR
Sheet960
Cell Formulas
RangeFormula
B1:B4B1=IF(AND(LEFT(A1,3)="302",COUNTIF($A$1:A1,A1)=1),"N","R")
 
Upvote 0
Solution
Hi,

Not sure I understand fully, is this what you mean:

Book3.xlsx
AB
1302aN
211bR
3302cN
4302aR
Sheet960
Cell Formulas
RangeFormula
B1:B4B1=IF(AND(LEFT(A1,3)="302",COUNTIF($A$1:A1,A1)=1),"N","R")
hi @jtakw, YES! this is what i meant! Thank you!
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,177
Members
452,615
Latest member
bogeys2birdies

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