Multiple Conditional IF statement

DRExcel515

Board Regular
Joined
Oct 20, 2017
Messages
56
Here is a formula I am trying to build that basically states: If the current month value is (null) and the next month value is (null) then say "OKAY", but if the current month value is (null) and the second month value is <>(null) say "Current Month NA?" and if all of that is false (current month is a value basically) then pull back that value. For some reason I keep getting a FALSE. I tried using an If(and, IF(or etc. but all give me the FALSE. Any help would be much appreciated.

IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$B3,'SQL Dump'!$A:$A,0))="(null)",IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$A3,'SQL Dump'!$A:$A,0))="(null)","OKAY",IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$B3,'SQL Dump'!$A:$A,0))="(null)",IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$A3,'SQL Dump'!$A:$A,0))<>"(null)","Current Month NA?",INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$B3,'SQL Dump'!$A:$A,0))))))

Or:
IF(AND(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$B4,'SQL Dump'!$A:$A,0)),INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$A4,'SQL Dump'!$A:$A,0)))="(null)","OKAY",IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$B4,'SQL Dump'!$A:$A,0))="(null)",IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$A4,'SQL Dump'!$A:$A,0))<>"(null)","Current Month Missing",INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$B4,'SQL Dump'!$A:$A,0),0))))
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Re: Multiple Conditional IF statement help

Substitute the cell references to match your sheets and replace the ""(blanks) with "null"

A2 is the current month value
B2 is next months value

=IF(A2<>"",A2,IF(AND(A2="",B2=""),"Okay",IF(AND(A2="",B2<>""),"Current month N/A")))
 
Upvote 0
Re: Multiple Conditional IF statement help

Try this

=IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$B3,'SQL Dump'!$A:$A,0))="(null)",IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$A3,'SQL Dump'!$A:$A,0))="(null)","OKAY",IF(INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$A3,'SQL Dump'!$A:$A,0))<>"(null)","Current Month NA?","XXX")),INDEX('SQL Dump'!D:D,MATCH('SD Calcs'!$B3,'SQL Dump'!$A:$A,0))
)

One scenario you havent catered for is when
current month is null and second month is not null, hence the XXX, amend as required.
 
Upvote 0

Forum statistics

Threads
1,223,991
Messages
6,175,820
Members
452,672
Latest member
missbanana

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