**Question description:**

*This user has given permission to use the problem statement for this blog.*

I have a spread sheet with numbers in different columns that add up and I need a formula in the last column which shows 1 or 2 listed.
if column f adds up to 30 a 1 should show in last column and if column f adds up to 60 a 2 should show.
I started the formula =IF(I3>29,"1") now how do I add to this formula to have the 2 show if greater then 39?

Solved by E. H. in 19 mins

This is the chat thread from the real Excelchat help session. It contains no private user information.

Excelchat Expert
10/10/2018 - 01:12

Welcome, Thanks for choosing Got It Pro-Excel. I can help you with that problem.

Excelchat Expert
10/10/2018 - 01:12

Before we get started, this is a reminder that our policy is 1 problem per session with additional Q&A on that problem as time allows.

Excelchat Expert
10/10/2018 - 01:12

Do you have sample data which we can use to illustrate how to solve this problem?

User
10/10/2018 - 01:14

Column I for the formula

[Uploaded an Excel file]

Excelchat Expert
10/10/2018 - 01:14

Okay. Thank you.

Excelchat Expert
10/10/2018 - 01:14

Just a moment as I follow closely your problem description and the data provided...please

User
10/10/2018 - 01:15

Sorry column M is where the formula goes

Excelchat Expert
10/10/2018 - 01:16

I need a clarification please..

Excelchat Expert
10/10/2018 - 01:17

Do you mean if the sum is between 1 and 29 inclusive then we should have 1 in column M

User
10/10/2018 - 01:17

in column M I need the formula to read if I3 is greater then 29 a 1 should show and also if I3 is greater then 39 a 2 should show.

Excelchat Expert
10/10/2018 - 01:17

Okay.

Excelchat Expert
10/10/2018 - 01:18

Based on what you’ve shared, you need an IF function which should return 1 if column I is greater than 29, and a 2 if column I is greater than 39.

Excelchat Expert
10/10/2018 - 01:18

I am creating a formula that will solve this problem. Will get back to you shortly.

Excelchat Expert
10/10/2018 - 01:21

What should happen if a value in column I is less than 29

Excelchat Expert
10/10/2018 - 01:21

Like 18

Excelchat Expert
10/10/2018 - 01:21

What should the function return in this case

User
10/10/2018 - 01:23

if less then 29 nothing

Excelchat Expert
10/10/2018 - 01:23

Very good.

Excelchat Expert
10/10/2018 - 01:23

Thank you for your patience and understanding!

Excelchat Expert
10/10/2018 - 01:23

The formula is:

Excelchat Expert
10/10/2018 - 01:23

=IF(I3>39,2,IF(I3>29,1,""))

Excelchat Expert
10/10/2018 - 01:23

Put it in M3

Excelchat Expert
10/10/2018 - 01:24

File with formula:

[Uploaded an Excel file]

Excelchat Expert
10/10/2018 - 01:24

Does this solution solve your problem?

User
10/10/2018 - 01:25

Yes Yes Yes and thank you

Excelchat Expert
10/10/2018 - 01:25

Do you have any other questions or clarification you may need about this problem and the solution?

**This is the output file from the real Excelchat help session:**

*This is an example of the expert help you can get. It contains no private user information.*