How to remove #N/A error from a Index match formula

jphina

New Member
Joined
Nov 20, 2021
Messages
9
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi, I know many have asked for help with N/A errors and I have tried to look at the solutions provided, but I still can't figure out my solution. I've tried IFNA and IFERROR and haven't had any success.

I simply want it to read "See PA" if N/A error which is being thrown due to the person being scanned in not have a workstation assignment in the labor board tab. Once staffed on labor board, the workstation tab copies the badge and login, then once the person scan's in for the day they are given there station assignment if they have been assigned, else when they scan in, i want it to read "See Pa" instead of "N/A".

Any help would be greatly appreciated.

If Not (Intersect(Target, Range("B:B")) Is Nothing) Then Target.Offset(0, 3).Value2 = IIf(IsEmpty(Target), _
"", "=INDEX(Workstations!$A:$C,MATCH(B" & Target.Row & ",Workstations!$A:$A,0),3)")
 

Attachments

  • Scan In tab.PNG
    Scan In tab.PNG
    8 KB · Views: 8
  • Labor board.PNG
    Labor board.PNG
    4 KB · Views: 9
  • Workstations Tab.PNG
    Workstations Tab.PNG
    4.8 KB · Views: 9

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi & welcome to MrExcel.
How about
VBA Code:
Target.Offset(0, 3).Value2 = IIf(IsEmpty(Target), _
"", "=ifna(INDEX(Workstations!$A:$C,MATCH(B" & Target.Row & ",Workstations!$A:$A,0),3),""See PA"")")
 
Upvote 0
Solution
Thank you! That worked!
Can you explain the 2x double quotes? I was trying single double quotes because I thought that is how it was supposed to be done.
 
Upvote 0
As the formula itself is inside quotes, then any quotes inside the formula need to be doubled-up, otherwise the See PA will be treated like a variable, in the same way Target.Row is.
If that makes sense.
 
Upvote 0
That makes perfect sense. Thanks for the explination!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top