Create a unique id based on 2 sets of criteria in sheets
CodePudding user response:
So, this is what I have tried, this is based on the date and the location, works with Excel, as OP mentioned is using MS365, hence may follow this
• Formula used in cell C2
=IFERROR(INDEX(C$1:C1,MATCH(1,(A2=A$1:A2)*(B2=B$1:B2),0)),MAX(C$1:C1) 1)
Works in Google Sheet as well,
=IFERROR(INDEX(C$1:C1,MATCH(1,(A2=A$1:A2)*(B2=B$1:B2),0)),MAX(C$1:C1) 1)
CodePudding user response:
use:
=INDEX(IF(B2:B="";;COUNTIF(A2:A&B2:B; A2:A&B2:B)))