Share via

If statement for array columns

Anonymous
2019-12-04T13:24:04+00:00

Hi all

I need a formula that returns me a true or false statement for an array column.

The statement is, if the product you select is water and the columns S and T contain numbers, then you need to remove the numbers, if you select water and columns T and S are empty then you are ok.

I used this formula

=IF(SUMPRODUCT(--('Fountain template carga'!N:N="Water"),--('Fountain template carga'!S3:T900>0))=0,"Ok","Remove values")

I keep getting a  #Value!

This is the excel reference, sheet name foutain template carga:

How can i make it work?

Thanks

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Andreas Killer 144.1K Reputation points Volunteer Moderator
2019-12-04T14:37:17+00:00

Try this one:

=IF(SUMPRODUCT(('Fountain template carga'!N3:N900="Water")*('Fountain template carga'!S3:S900+'Fountain template carga'!T3:T900))=0,"Ok","Remove values")

Andreas.

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2019-12-04T15:13:16+00:00

    Seem to work, so basically I have to use the + sign per column? There is no way to drag the whole matrix from S to V correct?

    When you use multiple columns means 1*0*0*1*0 = 0, but 1+0+0+1+0 = 2 that's the math behind it.

    Andreas.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-12-04T15:03:32+00:00

    Hi Andreas

    Seem to work, so basically I have to use the + sign per column? There is no way to drag the whole matrix from S to V correct?

    Thanks!

    Was this answer helpful?

    0 comments No comments