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
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!