It's a little tricky because of the nested IFs but here is my answer (confirmed in Google Spreadsheets):
=IF(AND(A2>=0, A2<500), "Less than 500",
IF(AND(A2>=500, A2<1000), "Between 500 and 1000",
IF(AND(A2>=1000, A2<1500), "Between 1000 and 1500",
IF(AND(A2>=1500, A2<2000), "Between 1500 and 2000", "Undefined"))))
Answer from eniacAvenger on Stack OverflowIt's a little tricky because of the nested IFs but here is my answer (confirmed in Google Spreadsheets):
=IF(AND(A2>=0, A2<500), "Less than 500",
IF(AND(A2>=500, A2<1000), "Between 500 and 1000",
IF(AND(A2>=1000, A2<1500), "Between 1000 and 1500",
IF(AND(A2>=1500, A2<2000), "Between 1500 and 2000", "Undefined"))))
I suggest using vlookup function to get the nearest match.
Step 1
Prepare data range and name it: 'numberRange':

Select the range. Go to menu: Data → Named ranges... → define the new named range.
Step 2
Use this simple formula:
=VLOOKUP(A2,numberRange,2)

This way you can ommit errors, and easily correct the result.
How do I include multiple conditions and outcomes in a google sheets formula
How would I write this IF/THEN formula? Is it even an IF/THEN formula?
Conditional Numbers based on a Set Number Range using IFS functions
If today falls between two dates, then return value in another cell?
Does Coefficient work with both Google Sheets and Excel?
What is Coefficient's AI Sheets Assistant?
Which business systems does Coefficient integrate with?
Okay, I'm not the best with google sheets, coding, or anything like that. If I'm explaining this issue poorly, I apologize. I'll try my best to express to explain what I'd like to do. Not to give my whole life story on this, but this is basically to help create a dynamic economy for a D&D campaign I'm running. The idea is that if I manually enter an input that affects the economy, it changes the economy all over the world to varying degrees, similar to a real economy.
Anyways, what I'm trying to do is write a function that if one set of numbers is between a range of numbers then it would spit out another number. So for example, y = 0.75 if x is greater than 40. y=1 if x is between 40 and 20. y = 1.25 if x is between 19 and 15. Hope this makes sense. As far as I am aware, I don't know how to express a number range in google sheets like this. I've tried a hyphen, it doesn't work. This is the current function I'm trying to use that doesn't work properly. =IFS(O8>40, 0.75, O8=40-19, 1, O8=19-15, 1.25, O8=14-10, 1.5, O8=9-4, 1.75, O8=4-1, 2)It expresses 0.75 and 1 correctly, but anything beyond that doesn't work. I'm guessing it's just seeing this as a regular IF statement, IF O8 is greater than 40, then 0.75, otherwise O8 is 1. Like I have inputs that are 9, which should be showing 1.75 and are instead showing 1.
Again, sorry if I'm expressing this poorly. Please let me know if I should use another function to do this. Perhaps there is an incredibly simple way to do this, that I'm missing. Any help would be greatly appreciated.