We have a Google Form using which users will submit their survey. It may so happen that same user might submit the survey multiple times, at which point we only want to consider the latest response and ignore all the previous responses. The sheet has two key columns (timestamp and email) and we have created an additional column "Accepted" which is expected to have two values "0" or "1" where responses with "0" are not accepted and responses with "1" are accepted (as this is the latest submitted response).
Timestamp | Email | Accepted
2020/06/01 00:05:22 | [email protected] | 0
2020/06/01 00:35:06 | [email protected] | 1
2020/06/01 01:45:51 | [email protected] | 1
2020/06/01 02:03:40 | [email protected] | 0
2020/06/01 03:44:01 | [email protected] | 1
The first row of the Google Sheet has headers. So, the formula entered in C2 is:
=IF(COUNTIF($B$1:B2,B2)=COUNTIF($B$1:B,B2),1,0)
which works perfectly when dragged to all the rows. However, since we want to update the Column C to each new response, tried using the ARRAYFORMULA as below:
=ARRAYFORMULA(IF(COUNTIF($B$1:B2,B2:B)=COUNTIF($B$1:B,B2:B),1,0))
which returns 0 to all rows. Link to the sample Google Sheet is below: https://docs.google.com/spreadsheets/d/1qAdOIV_ZioBw41UR_WEBR_Ean5tQ0Yd_f6oLRi83fOk/edit?usp=sharing
Please help. Thanks in advance :)