Nested If Statement causing problems

WxShady13

Board Regular
Joined
Jul 24, 2018
Messages
184
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have a Spreadsheet that has the nested if statement below. What is happening is it looks to see if column G (stores a date) is blank, if not it just uses that date. Then if it is not blank it checks to see if column U has a name of an acquisition in the column. If there is a name in that column it pulls the date we acquired the company. Finally if the other statements are false it uses the Employees ID # against a table that has their DOH and brings that in. There are over 5000 rows on this sheet and it works for the majority of them, however with some lines I get a FALSE and others I get #N/A when I clearly see them on Table1 and also some are an acquisition with the vendor name in column U. Why is this failing for some?



IF(G1243<>"",G1243,IF(U1243=0,VLOOKUP(A1243,Table1[#All],2,IF(T1243<>0,VLOOKUP(A1243,Table5[#All],2,FALSE)))))
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Looks like you have some of the brackets in the wrong place, try
Excel Formula:
IF(G1243<>"",G1243,IF(U1243=0,VLOOKUP(A1243,Table1[#All],2,FALSE),IF(T1243<>0,VLOOKUP(A1243,Table5[#All],2,FALSE))))
 
Upvote 0
Looks like you have some of the brackets in the wrong place, try
Excel Formula:
IF(G1243<>"",G1243,IF(U1243=0,VLOOKUP(A1243,Table1[#All],2,FALSE),IF(T1243<>0,VLOOKUP(A1243,Table5[#All],2,FALSE))))
Unfortunately it is still giving me the #N/A even though the Acquisition name field is populated and matches a name on Table5
 
Upvote 0
Check that the value in A1243 & the corresponding value in the first column of table5 are exactly the same, no typos & no leading/trailing spaces.
 
Upvote 0
Check that the value in A1243 & the corresponding value in the first column of table5 are exactly the same, no typos & no leading/trailing spaces.
I did and there aren't any leading spaces. Its generating the #N/A from the 2nd If statement because column U doesn't have a 0.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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