• 393K Members
• 2,925 Online
• 424K Conversations

Highlighted
New Contributor

# Excel formula

Hi I'm wanting to create a formula where I want something like this.

if C2+E2+H2 = B2 and J2=a then n2=a or r if not true.

I've gone through the tutorials but it's just doing my head in and I can't work it out.

any help would be greatly appreciated.

Many thanks

Wobly

5 Replies

# Re: Excel formula

You can use below formula

=IF(AND(C2+E2+H2=B2,J2=A2),A2,R2)

Sample file is also attached for your reference.

Tauqeer

# Re: Excel formula

In N2

=IF(AND(SUM(C2,E2,H2)=A2,J2="a"),"a","r")

The advantage of using SUM(C2,E2,H2) over C2+E2+H2 is, if in any case C2 or E2 or H2 contains a text string or a null string returned by another formula, C2+E2+H2 will throw an error as you cannot add a string to a number whereas SUM(C2,E2,H2) will ignore the text values.

# Re: Excel formula

Thank You very much.

Wobly

# Re: Excel formula

Thank you very much.

Wobly

# Re: Excel formula

You're welcome Wobly!

Subodh

Related Conversations