Forum

Notifications
Clear all

if statement and spill ranges always returns FALSE

2 Posts
2 Users
0 Reactions
126 Views
(@darkwing1711)
Posts: 31
Trusted Member
Topic starter
 

I've tried two different formulas

=IF(AND(INDEX($Y$6#,$A$6#)=1,INDEX($X$6#,$A$6#)>40),$W$6#-1,$W$6#)

and

=IF(AND($Y$6#=1,$X$6#>40),$W$6#-1,$W$6#)

For some reason, it ALWAYS comes out FALSE.  Is there a work around this?

 

Data is below

Column W Column X Column Y
Year WK Month
2022 1 1
2022 1 1
2022 1 1
2022 1 1
2022 1 1

Thanks in advance!

 
Posted : 07/09/2022 5:42 pm
Riny van Eekelen
(@riny)
Posts: 1201
Member Moderator
 

Hi Kenneth,

Try it this way:

=W6#-((INDEX($Y$6#,$A$6#)=1)*(INDEX($X$6#,$A$6#)>40))

Your formula will always give TRUE if all numbers in X are greater than 40 AND all numbers in Y are equal to 1. As soon as this is not the case the result is FALSE.

Riny

 
Posted : 08/09/2022 1:30 am
Share: