1

I have a script that automatically adds a new row to Tab 2 when a row is added on Tab 1. However I want my formulas on Tab 2 to autofill into the row that is added. Here is my formula:

=IF(AND(ISNUMBER(L2),ISNUMBER(M2)),(IF(COUNTIF(O2,"*"), "Y-REV", "Y")), "")

Trying to autofill into B2:B, but this didn't work with any of the ArrayFormulas I tried to make. How would I do this?

1 Answer 1

2

AND() is not compatible with ArrayFormulas, you need to find another calculation. Furthermore we cannot use COUNT() because otherwise we would obtain a value that is always valid even if there was an asterisk in a single cell of column O, In its place we will use REGEXMATCH()

Try this:

=INDEX(IF(ISNUMBER(L2:L)*ISNUMBER(M2:M),IF(REGEXMATCH(" " &O2:O,"\*"), "Y-REV", "Y"), ""))
1
  • thank you so much, this almost worked! i was using countif "*" to see if the cell was text because I didn't realize the istext function existed. For some reason your regexmatch does not work, but I replaced it with istextO2:O and that works perfectly! thank you!! :)
    – dea
    Commented Aug 25, 2022 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.