Forum Discussion
Tony2021
Mar 12, 2022Iron Contributor
IF Statement help. If Null return Null
Hello, if A11 is null then how could I return nothing (meaning nothing in the cell..ie null). In the below, if A11 is null then it returns "Not In a DD" =IF(ISNA(VLOOKUP(A11&B11&C11,ProjectCosts...
- Mar 17, 2022
Yup, that changes things.
=IF(TRIM(CLEAN(A11))="","",IF(ISNA(VLOOKUP(A11&B11&C11,ProjectCostsPQ_FE.xlsx!Project_Costs[[#All],[Vendor]]&ProjectCostsPQ_FE.xlsx!Project_Costs[[#All],[Invoice '#]]&ProjectCostsPQ_FE.xlsx!Project_Costs[[#All],[Invoice amount]],1,FALSE)),"NOT IN a DD","In Previous DD"))
Tony2021
Mar 13, 2022Iron Contributor
Hi houghtonap, thank you for the response.
I tested and it seems to return "In Previous DD" if A11 is blank. Do you have another suggestion?
thanks for the tip. I wasnt exactly sure how to convey what I wanted to say but yes you were correct.
I tested and it seems to return "In Previous DD" if A11 is blank. Do you have another suggestion?
thanks for the tip. I wasnt exactly sure how to convey what I wanted to say but yes you were correct.
houghtonap
Mar 14, 2022Copper Contributor
Are you sure that cell A11 is actually empty and it doesn't contain spaces? If for some reason it does contain spaces, the change the formula to
IF(TRIM(A11)="",NA(),A11)
I tested this by doing the following:
$A1 =IFERROR(IF(TRIM(A11)="",NA(),A11)&B11&C11,"EMPTY")
$A11 =""
$B11 ="ABC"
$C11 ="DEF"
When cell A11 is empty or spaces, then cell A11 has "EMPTY", otherwise it has cells $A11:$C11 concatenated together.
IF(TRIM(A11)="",NA(),A11)
I tested this by doing the following:
$A1 =IFERROR(IF(TRIM(A11)="",NA(),A11)&B11&C11,"EMPTY")
$A11 =""
$B11 ="ABC"
$C11 ="DEF"
When cell A11 is empty or spaces, then cell A11 has "EMPTY", otherwise it has cells $A11:$C11 concatenated together.
- houghtonapMar 14, 2022Copper Contributor
Sorry "When cell A11 is empty or spaces, then cell A11 has "EMPTY", "
Should read: When cell A11 is empty or spaces, then cell A1 has "EMPTY",
- Tony2021Mar 16, 2022Iron ContributorHi Hough, sorry for my tardy reply.
I might have to explained it well enough.
If A11 is blank then return a Blank. I do not want to return "NOT IN a DD","In Previous DD"...just return "".
does that change anything? thank you for the help.- houghtonapMar 17, 2022Copper Contributor
Yup, that changes things.
=IF(TRIM(CLEAN(A11))="","",IF(ISNA(VLOOKUP(A11&B11&C11,ProjectCostsPQ_FE.xlsx!Project_Costs[[#All],[Vendor]]&ProjectCostsPQ_FE.xlsx!Project_Costs[[#All],[Invoice '#]]&ProjectCostsPQ_FE.xlsx!Project_Costs[[#All],[Invoice amount]],1,FALSE)),"NOT IN a DD","In Previous DD"))