spudmcc

asked on

# If statement with a twist---URGENT

Hi All!

I have a large spreadsheet with nearly a million rows. I have a column (L)=Var% which is a percentage. What I need to do is create a column that tells the following:

if L >=0% but <=5% then '0'

if L >=10% but <=20% then '.15'

if L >=21% but <=40% then '.30'

if L >=41% but <=60% then '.50'

if L >=61% but <=80% then '.70'

if L <0% but >=-9% then '0'

if L <-10% but >=-20% then '-.15'

if L <-21% but >=-40% then '-.30'

if L <-41% but >=-60% then '-.50'

if L <-61% but >=-80% then '-.70'

if L <-81% but >=-99% then '-.80'

else '0'

Your help would be greatly appreciated.

spudmcc

I have a large spreadsheet with nearly a million rows. I have a column (L)=Var% which is a percentage. What I need to do is create a column that tells the following:

if L >=0% but <=5% then '0'

if L >=10% but <=20% then '.15'

if L >=21% but <=40% then '.30'

if L >=41% but <=60% then '.50'

if L >=61% but <=80% then '.70'

if L <0% but >=-9% then '0'

if L <-10% but >=-20% then '-.15'

if L <-21% but >=-40% then '-.30'

if L <-41% but >=-60% then '-.50'

if L <-61% but >=-80% then '-.70'

if L <-81% but >=-99% then '-.80'

else '0'

Your help would be greatly appreciated.

spudmcc

ASKER

Lots of zero's and nothing else. ??????

ASKER CERTIFIED SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.

lol :) I thought you have numbers between -100 & +100

I guess you have numbers between -1 & +1

I guess you have numbers between -1 & +1

ASKER

This worked great! I so appreciate all of your help, patience and talent. Thank you so much.

spudmcc (Andy)

spudmcc (Andy)

then use

B1 =getValue(A1)

assuming your data in in col A

copy down

Open in new window