Home > Back-end >  Cannot get CountIf incorporated into array properly
Cannot get CountIf incorporated into array properly

Time:07-26

I want to place an array in a header to fill the column with a forumla when a row is not empty.

I use the below to pull information from a particular cell and it works great.

=ARRAYFORMULA(if(row(G:G)=1,"Delivery Method",
if(REGEXMATCH(G:G,"QAS"),"QAS",if(REGEXMATCH(G:G,"Group"),"GIB",""))))

However I need to create a unique identifier for the email address.

I want to do this by using

=C2&countif(C2:C$3,C2)

This basically adds a numeric counter if the email shows more than once, eg. [email protected], [email protected]

I can't figure out how to incorporate the array with it in google sheets. The below doesn't work fully. Thoughts? It doesn't increment the count, only shows the total count in the range per email.

=ARRAYFORMULA(if(row(C:C)=1,"Email ID",C:C&countif(C:C ,C:C)))

CodePudding user response:

try:

=ARRAYFORMULA({"Email ID"; C2:C&COUNTIFS(C2:C, C2:C, ROW(C2:C), "<="&ROW(C2:C))})

=ARRAYFORMULA({"Email ID"; IF(C2:C="",,
 C2:C&COUNTIFS(C2:C, C2:C, ROW(C2:C), "<="&ROW(C2:C)))})
  • Related