IF Statement Issue

daza34

Board Regular
Joined
Feb 14, 2017
Messages
70
Hi All,

I know that there will be multiple threads about IF statement issues but i thinks mines quite specified :(

You will see from below the statement checks for data in the cells and if empty moves onto the next.

=IF(O4961<>"",M4961=H4961,IF(I4961="",IF(J4961="",IF(K4961="",L4961=H4961,K4961=H4961),J4961=H4961),I4961=H4961))

However i have an issue were data is showing up in J as well as K which is throwing out the if statement.

Basically if the above J and K issue happen I want it to look in R and if it contains ROI I want it to ignore J.

I Just dont know were to put it in the statement. The data is coming from SQL by the way
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
So I am no expert at all, but I have some questions as I look at your post. Your formula does not currently contain any reference to an "R" cell at all, is it supposed to be in your current formula or are you asking for help in adding that in.

Also, your statements within your formula, like "M4961=H4961" will return True or False, it doesn't set the 1st cell to be the same as the 2nd cell, is that what you want it to do, return True or False?

From what I gather you check to see if O4961 is not blank, and if it isn't you get a True/False, then after that you start looking at I, J & K to see if they are blank, and if they are again return some kind of True/False.

What are you trying to do here, and do you have any sample data to work with, you can scrub it and put in test data if you can't post the real info. It is hard, at least for me, to see what you are trying to do here.
 
Upvote 0
I how the below helps, as you can see the formula it goes from I checking for a value and when it finds one compares it to H

The true and false works for me at the moment.
[TABLE="width: 500"]
<tbody>[TR]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]R[/TD]
[TD]RESULT[/TD]
[/TR]
[TR]
[TD]24.66[/TD]
[TD][/TD]
[TD]1370.73[/TD]
[TD]24.66[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ROI123[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]29.20[/TD]
[TD][/TD]
[TD]1370.73[/TD]
[TD]29.20[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ROI243[/TD]
[TD]FALSE
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
OK that helps me some, but I need a bit more clarification, your data you posted the 3 number values are in columns H, J and K, correct?

Also, what do you want to happen if ROI is found in column-R, assuming both J & K are ""? What do you mean by ignore J?

I'm also at work, so my responses might be slow, maybe another member can jump in as well if they have a solution for you.
 
Upvote 0
If J & K are both "" it will return a false which is fine. When i say ignore J i mean I dont want it to compare J to H, I want it to compare K to H, depending on the ROI condition.
 
Upvote 0
Right now your formula compares both J & K and if they are both blank it would then compare L4961=H4961, but that also assumes I is blank as well.

So you aren't comparing J to H if J&K are both "", the only time you compare J to H is if O isn't "", I is "" and J is NOT "", then you compare J4961 = H4961.

So is that when you want to check for the ROI value in column-R, or do you mean something different?

Also, will your value in column-R always start with ROI, or can it be in different formats?

 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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