• 507K Members
• 6,535 Online
• 603K 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

As per your description, please try this...

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
Creating A Sublist
zjohnson in Excel on
5 Replies
Excel Forumla to exclude empty cells.
ulken2019 in Excel on
6 Replies
Need FORMULA help please!!
marislav in Excel on
4 Replies
Help with minutes/seconds to seconds.
SteveMorley in Excel on
1 Replies
formula for data calculation
aayushman_mishra in Excel on
10 Replies