**Question description:**

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

trying to see if there's a formula for what i need. i'll have a column of numbers and want the next column to say either "1" "2" or "3" based on the value of the prior column. tried playing witht the if function, but that seems to only have 2 answers

Solved by B. H. in 8 mins

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

Excelchat Expert
25/04/2018 - 02:00

Hi there!

Excelchat Expert
25/04/2018 - 02:00

I think you're on the right track with your IF logic... might you be able to make a quick example of how the sheet is set up in the google sheet over there ------------>

Excelchat Expert
25/04/2018 - 02:01

Perfect and then let me know your desired logic and I will make it happen!

User
25/04/2018 - 02:02

basically looking for a formula to say if the number in A is less than -2000, put 1 in B, between -2000 and 0, put 2 in B, anything greater than 0, put 3 in B

Excelchat Expert
25/04/2018 - 02:02

Fantastic

Excelchat Expert
25/04/2018 - 02:02

You were definitely right with your IF function - but we can use IFS instead

Excelchat Expert
25/04/2018 - 02:03

Let me create it and you can copy to your sheet and see if it works.

Excelchat Expert
25/04/2018 - 02:05

Try this:

Excelchat Expert
25/04/2018 - 02:05

=IFS(A1<-2000,1,A1<=0,2,A1>0,3)

User
25/04/2018 - 02:07

so i wouldn't have to set a range necessarily for "2". if it's less than 2,000, the first if takes precedent and it'll put a 1?

Excelchat Expert
25/04/2018 - 02:07

You got it

User
25/04/2018 - 02:07

perfect, thanks!

Excelchat Expert
25/04/2018 - 02:08

less than -2000

Excelchat Expert
25/04/2018 - 02:08

My pleasure!

Excelchat Expert
25/04/2018 - 02:08

Feel free to ping us back if you need further assistance - always happy to help!

**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.*