Simply array?

ChristineJ

Well-known Member
Joined
May 18, 2009
Messages
761
Office Version
  1. 365
Platform
  1. Windows
For any row in range B1:C11, if there is an amount in both column B and column C, I want to return "Cannot have two amounts on the same row." in cell E1. (Otherwise return "OK").

Here is what is currently in E1, although not working:
{=IF(AND(B1:B11<>"",C1:C11<>""),"Cannot have two amounts on the same row.","OK")}

Can this be done?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Maybe
Excel Formula:
=IF(MAX((B1:B11<>"")*(C1:C11<>"")),"Cannot have two amounts on the same row.","OK")
 
Upvote 0
Solution
Thanks for the suggestion - close. However, I don't want to find when both cells are equal, but when they are both not blank.
 
Upvote 0
Maybe
Excel Formula:
=IF(MAX((B1:B11<>"")*(C1:C11<>"")),"Cannot have two amounts on the same row.","OK")
Thanks so much! This works perfectly - just what I need. I would never have known to try this. Appreciate all the help - you have responded to me several times with solutions!
 
Upvote 0
Glad we could help & thanks for the feedback.

For future reference, when "Marking as Solution" you need to select the post that answers your question, not your post saying it works. I have changed it for you this time.
 
Upvote 0
Glad we could help & thanks for the feedback.

For future reference, when "Marking as Solution" you need to select the post that answers your question, not your post saying it works. I have changed it for you this time.
Yes, of course! Will be more careful on that next time. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

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