IF function issues w/ empty cells

B

Bri

I have data that needs to be converted and I've tried using excel help for
assistance. Example...
- If cells contain #'s > 9 - it needs to return a 2
- If cells contain #'s >3 and <10 - it needs to return a 1
- If cells contain #'s = 0 and <4 - it needs to return a 0
- If cells contain no data / empty - it needs to return a 0
Depending on how I write the formula which has included OR, ISBLANK &
LOOKUP, I only manage to get parts of it to work. Any assistance would be
greatly appreciated. Bri
 
L

Lars-Åke Aspelin

I have data that needs to be converted and I've tried using excel help for
assistance. Example...
- If cells contain #'s > 9 - it needs to return a 2
- If cells contain #'s >3 and <10 - it needs to return a 1
- If cells contain #'s = 0 and <4 - it needs to return a 0
- If cells contain no data / empty - it needs to return a 0
Depending on how I write the formula which has included OR, ISBLANK &
LOOKUP, I only manage to get parts of it to work. Any assistance would be
greatly appreciated. Bri

Assuming your data are all non negative integers, try this formula:

=LOOKUP(A1,{0,4,10},{0,1,2})

Hope this helps / Lars-Åke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top