Nested if formula not working

Damian37

Active Member
Joined
Jun 9, 2014
Messages
301
Office Version
  1. 365
Hello Everyone,
I'm trying to use the following formula:
<code>
=IF(P31=T31,"No-Affiliate bill code = Emp bill code",IF(P31<>T31,"Yes-See Column Q",IF(ISNA(VLOOKUP(K31,'Company Employee Codes'!$B$2:$B$198,1,FALSE)),"No-Account has the correct Emp bill code",0)))</code>

The first two are working, because it's a direct comparison from one cell to another, however, the portion which includes the vlookup and a range isn't working, and I haven't been able to figure out why. Right now, I'm getting #N/A for anything pertaining to that last if statement . Any help would be greatly appreciated. Thank you.

Damian
 
Last edited by a moderator:

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
P31 is either equal or not equal to T31, which means the bolded functions are never called. I think you need to post a small sample of your data and desired results.
 
Upvote 0
P31 is either equal or not equal to T31, which means the bolded functions are never called. I think you need to post a small sample of your data and desired results.
The P cell isn't being called on within the last IF statement. The last IF statement pertains to the values within cell K. The comparison is between cells K and B. The vlookup is to compare the individual cells within column K to the values within the range B2:B198. So I'm really just asking if the way it's being written is correct in order to bring back the value within quotations.
 
Upvote 0
So if P31 is equal to T31, you want to return "No-Afficiliate bill code = Emp bill code"
If P31 isn't equal to T31, what do you want to return?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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