I am needing the below formula to also allow for the argument of N to be Refused or Blank if no data is entered into the recording file. I keep running into the error of too many arguments and most logical things that I have tried have not worked.
=IF(IFERROR(INDEX(FILTER([Recording.xlsx]Wednesday!$D$2:$D$26,[Recording.xlsx]Wednesday!$B$2:$B$26<>""),ROW()-2),"")="Y","Accepted","")
I am wanting to include the following:
="N","Refused","")
The formula needs to check the file for Y, N, or left blank. If Y it will return Accepted, if N will return refused, if no information is entered it will remain blank.
Thanks for any help!
CodePudding user response:
Like commented above, I would use the SWITCH function:
=SWITCH(IFERROR(INDEX(FILTER([Recording.xlsx]Wednesday!$D$2:$D$26,[Recording.xlsx]Wednesday!$B$2:$B$26<>""),ROW()-2),""),"Y","Accepted","N","Refused","")
This way, you avoid using an auxiliary cell, and most importantly, avoid repeating the whole call to IFERROR(INDEX(FILTER()))
.
Indented view for better understanding:
=SWITCH
(
IFERROR
(
INDEX
(
FILTER([Recording.xlsx]Wednesday!$D$2:$D$26,[Recording.xlsx]Wednesday!$B$2:$B$26<>""),
ROW()-2
),
""
),
"Y","Accepted",
"N","Refused",
""
)