• 100% Satisfaction Guarantee

Jess M., Computer Support Specialist
Category: Microsoft Office
Satisfied Customers: 5556
Experience:  Computer Software Specialist for more than 10 years
49766785
Type Your Microsoft Office Question Here...
Jess M. is online now

# im trying to use a if statement but dont now how to make it

### Resolved Question:

im trying to use a if statement but don't now how to make it do what I want

if A2 is between 5000 & 5999
true h2+250-d2
False ""

=IF(A2 ?????",H2+250-D2,"")
Submitted: 2 years ago.
Category: Microsoft Office
Expert:  Jess M. replied 2 years ago.
Hi, welcome and thank you for your question. My name is XXXXX XXXXX I am glad to assist you today.

You can use the AND function to encapsulate your IF conditions. Here is a working logic:

IF A2 > 5000 and
IF A2 < 5999 and

This means that if A2 is greater than or equal to 5000 but less than and equal to 5999, H2 + 250 - d2. Else, it shows blank.

Now, the formula shall be:
=IF(AND(A2>5000,A2<5999),H2+250-C2,"")

Please remember to rate my service positively (3-5 stars/faces) once you have all the
information you need. Tips are always highly appreciated!

If you have any other questions, please ask me or reply to me – I’ll be happy to respond.

Thank you!

Best regards,
Jess
Customer: replied 2 years ago.

this is weird when I do it alone it works but when I put it in the form

it dont work it just gives me a false reading ""

A2 = 5140

H2 = 500

C2 = 700

the outcome should be 50

I get ""

Expert:  Jess M. replied 2 years ago.
Ken,

What form are you referring to? Here is the Excel file that serves as sample for you.

If it has combo boxes or other controls, please make sure that the references of cells are intact. Also, you can send a copy of the Excel file by uploading it to http://wikisend.com and then give me the 6-digit File ID so that I can download your sample Excel file.

I hope that helped.
Jess
Customer: replied 2 years ago.
Expert:  Jess M. replied 2 years ago.
I got the file. Give me a minute to check it.

Jess
Expert:  Jess M. replied 2 years ago.
Ken,

Thank you for waiting. Instead of using AND, we need to use OR. AND logic means that ALL conditions must be TRUE so that it will result to true. Otherwise, it will result to false.

The OR logic however gives TRUE if ANY one of the logic is TRUE. In the new OR formula, if A3 > 5000 OR A3 < 5999, it will result to true and will calculate the TRUE statement.

Also, I created a second sheet with the inclusive formula. That is, if A3 = 5000 and A3 = 5999, it will give TRUE.

Please remember to rate my service positively (3-5 stars/faces) once you have all the
information you need. Tips are always highly appreciated!

If you have any other questions, please ask me or reply to me – I’ll be happy to respond.

Thank you!

Best regards,
Jess
Customer: replied 2 years ago.

the file you sent back says

=IFERROR(IF(OR(A3>5000,A3<5999),(E3+500)-C3,""),"")

whats = iferror

also if I change the truck # XXXXX formula don't change anything?

Expert:  Jess M. replied 2 years ago.

Ken,

Sorry for the confusion, but the logic should be AND because it is inclusive. That is, A3 MUST BE greater that 5000 but less than 5999. If it is an OR, if the truck number is XXXXX it must be false, but the OR formula gives a TRUE because A3
Here is the formula:
=IFERROR(IF(AND(A3>5000,A3<5999),(E3+500)-C3,""),"")

IFERROR means, if the result is an error, it will show "" (blank). If there is no error, it will show the results of the formula.

Here is the formula with NO iferror encapsulation:
=IF(AND(A3>5000,A3<5999),(E3+500)-C3,"")

The problem WHY the results are not displayed is because the numbers in the truck # XXXXX is set to TEXT, not numbers. I changed them to number format so it works now.

Please remember to rate my service positively (3-5 stars/faces) once you have all the
information you need. Tips are always highly appreciated!

If you have any other questions, please ask me or reply to me – I’ll be happy to respond.

Thank you!

Best regards,
Jess

Jess M., Computer Support Specialist
Category: Microsoft Office
Satisfied Customers: 5556
Experience: Computer Software Specialist for more than 10 years

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

### What Customers are Saying:

• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Previous | Next >
• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland

• ### jstinehelfer

#### Satisfied Customers:

36
A+ Comptia Certified computer repair
< Last | Next >

### jstinehelfer

#### Satisfied Customers:

36
A+ Comptia Certified computer repair

### JasonJames122

#### Satisfied Customers:

0
I manage all information systems (network of Windows PC's and servers with Microsoft Office products) for a small business

### Jess M.

#### Satisfied Customers:

481
Computer Software Specialist for more than 10 years

### The-PC-Guy

#### Satisfied Customers:

450
20 years experience providing remote computer support

### James K.

#### Satisfied Customers:

260
Technical Director of IT Company

### IT Miro

#### Satisfied Customers:

147
Bachelor's Degree in Information Technology, Microsoft Certified Professional

### Chris L.

#### Satisfied Customers:

137
Certified Expert with over 10 years experience.