Search code examples
google-sheetsarray-formulas

How to use ARRAYFORMULA to classify the Action in google sheet?


enter image description here

Hi everyone,

I'm using ARRAYFORMULA to summarized the Action in column A. The classification should be:

  1. Enter and Re-enter = Entry order
  2. Exit = Other

Based on my formula in cell B2, seems like I'm not able to use ARRAYFORMULA in this case because the output are all Entry order. Instead of applying formula to each cell in column B, how should I modify my formula so that the ARRAYFORMULA work perfectly?

Any help will be greatly appreciated!


Solution

  • "OR" can't be iterated over an array. Instead try

    =Arrayformula(if(len(A2:A), if( (A2:A="Enter")+(A2:A="Re-enter"), "Entry order", "Other"),))