Excel help please! Nested IF or Vlookup, I think?

Soldato
Joined
26 Aug 2003
Posts
24,289
Sup!

I'm actually using Apple Numbers but IF formulas and I believe lookups work the same way, so I figured I would be much more likely to get an answer in here.

What I am trying to is this. There will be a number in a cell.

If it's less than £25000 I want it to return 0
If it's £25000 or more, but less than £30000, I want it to return £100
If it's £30000 or more but less than £35000, I want it to return £200
If it's £35000 or more but less than £40000, I want it to return £300

and so on up to say £60000.

I'm really struggling, I think it's the number range being involved that's confusing me!

I also found something while trying to find this mentioning a vlookup, and how it's better, but I didn't 100% understand it. Would a vlookup be better?

Thanks, I'm pulling my hair out!
 
This what your after:

Code:
=IF(A1<50000,IF(A1<45000,IF(A1<40000,IF(A1<35000,IF(A1<30000,IF(A1<25000,0,100),200),300),400),500),600)

Im sure theres a better way to do it.

Edit: I think I misread your post, Are you currently using something like I posted?
 
I was trying to make something like you posted, but was really struggling to work it out properly. I've made some quite long if statements before but not with a number range and it was just confusing me. Really long bits of code like that just confuse and frustrate me!

I've never used vlookup, I just saw someone else suggest it as more suitable for a similar problem, so wanted to know if it would be apt for mine.

I just put your code in and it works perfectly, thanks!

I'll look over it and see where I went wrong, but I think I can see it. Mine wasn't nested properly I don't think - I'm too tired to be able to make it work on my own :D Cheers again :)
 
Back
Top Bottom