If no data is entered into the recording file, I need the formula below to support the argument of N being Refused or Blank as well. I keep making the mistake of having too many reasons, and even the most logical solutions I have tried have failed.

```=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.

Feb 3, 2023 in Others 403 views

## 1 answer to this question.

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",
""
)```
• 63,700 points

## Pentaho excel input from multiple sheets to textfile

It's possible to use numerous Excel inputs ...READ MORE

## Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

Forget the PsychoPy complications for the time ...READ MORE

## In Blue Prism how to split excel column data into TWO columns

This is how I am doing it. Dim ...READ MORE

## Excel Power Query: Using List.MatchAny on a column value

try this. let TableA = ...READ MORE