Nested if statement or an array formula

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,023
Office Version
  1. 365
Platform
  1. Windows
I have to set up a tracking spreadsheet and I'm trying to work out a formula for the following:

In cell P1:

1. If Cell C1 and Cell L1 are blank, then P1 is blank
2. If Cell C1 is not blank and L1 is blank, then P1 displays "Error"
3. If Cell C1 is blank and L1 is not blank, P1 dispalys "Error"

Any help or suggestions would be most appreciated.

Thanks.
 
Hi,

Thank you for your explanation. I believe I understand your requirements.

If the formula is to be placed in a Sheet OTHER than "Antigens", then use:


Excel 2010
P
26N 2 Six
Sheet1
Cell Formulas
RangeFormula
P26=IF(Antigens!$H26="","",IF(Antigens!$H26))


If the formula is placed in the Sheet "Antigens", the formula won't need Sheet references, then use this:


Excel 2010
HIJKLMNOP
261020M 2 SixN 2 SixN 2 Six
2730M 2 SevenN 2 SevenM 2 Seven
2820M 2 EightN 2 Eight
292030M 2 NineN 2 NineN 2 Nine
Antigens
Cell Formulas
RangeFormula
P26=IF($H26="","",IF($H26<$J26,$N26,$M26))


Ignore what's in Columns M and N, that's just sample data to show the result in Column P.
Copy Column P formula up and/or down.

Let me know if this works for you, or if I may have misunderstood what you need.
 
Last edited:
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,215,737
Messages
6,126,559
Members
449,318
Latest member
Son Raphon

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