IF + INT/INDEX
Hello! I'm having trouble getting this formula to work (it's giving invalid data type):
=IF(AND({OTD/FTY Range 4}) = YEAR(TODAY()); IF(AND({OTD/FTY Range 1} = "1"; IF({OTD/FTY Range 2} = "90%"; INT({OTD/FTY Range 3})))))
So what I want to do is create multiple if statements. The first is if the year column is the year today; the second is if the month column (it's not a date column) equals the number "x" ("1" being january, etc.); and the third is if the cell value equals to 90%. If all of those statements are true, then I want to index the cell value.
Answers

Try this instead:
=IFERROR(INDEX(COLLECT({Range To Pull}, {Year Range}, @cell = YEAR(TODAY(), {Month Range}, @cell = 1, {% Range}, @cell = 0.90), 1), "")

@Paul Newcome It´s giving incorrect argument :/
Here's a picture from the sheet I'm trying to extract this info from! The "Meta" column is actually a formula column. I tried to alter you formula to "90%" but it still isn't working

Each {Range} should only be referencing a single column. Do you have that error anywhere in any of the cells being referenced in your ranges?

@Paul Newcome I think the problem is at the year(today()) formula... I removed it and it's working perfectly, but I still want to add that statement. Here's the formula now:
=IFERROR(INDEX(COLLECT({OTD/FTY Range 3}; {OTD/FTY Intervalo 1}; @cell = 1; {OTD/FTY Range 2}; @cell = "90%"); 1); "")
I tried to add {OTD/FTY Range 4}; @cell = YEAR(TODAY()) and it didn't work

How is the Year column being populated?

@Paul Newcome By hand! I just digit "2023" on the cell

It looks like I missed a closing parenthesis in my first formula. Here it is corrected.:
=IFERROR(INDEX(COLLECT({Range To Pull}, {Year Range}, @cell = YEAR(TODAY()), {Month Range}, @cell = 1, {% Range}, @cell = 0.90), 1), "")
Help Article Resources
Categories
Check out the Formula Handbook template!