Search code examples
excelfilteringmultiple-columns

Excel Tri-state variable to denote table row status


I am trying to return an array of a tri-state variable for rows in a table with 3 columns and multiple criteria. I am using excel mobile. This has no available name manager and no entry validation. Formula editing over 4 lines is also awkward.

The status of the table row (actual return values don't really matter, just that they can be distinguished) is:-

"E" - Empty, "V" - Valid, "I" - Invalid

Valid rows will be pulled somewhere else and used.

Criteria columns are, M1,M2,M3. Rules are:-

Empty: all three columns only contain "".

Valid:

- Columns M1 and M2 contain a currency value (2 significant decimals is good enough) and it may be zero (but not blank) and


- Column M3 as above, but it may also be blank.

Invalid:

- Not the above

I have been trying to do it with a Table and Dynamic Arrays. The input data grows over time and is not necessarily contiguous.

Ideally a very limited number of helper columns.

I have an untidy implementation in the sample. I have tried various filters and combinations with byrow and map and makearray but have so far been unable to find anything adequately "elegant".

I can't find how to add sample, but here's a picture.

[Example][1]

Sample


Solution

  • My proposal of a formula in E2:

    =IFS(B2&C2&D2="","E", AND(IF(ISNUMBER(B2:C2),ROUND(B2:C2,2)=B2:C2),
     OR(IF(ISNUMBER(D2),ROUND(D2,2)=D2),D2="")),"V", TRUE,"I")  
    

    Currency Validation