? Nested If statement

  • Thread starter Thread starter Jill Pleau
  • Start date Start date
J

Jill Pleau

I am working on a spreadsheet to calc our emps vacation time. Look a
cell A1 and if the contents are as follows give me the resultin
week.

<1 then 0; >=1 but < 5 then 1; >=5 but < 10 then 3; >-10 but < 15 the
4; >-15 but < 20 then 5

Can't seem to figure out the proper sytax.

Any help would be appreciated!

TIA,

Jil
 
<1 then 0; >=1 but < 5 then 1; >=5 but < 10 then 3; >-10 but < 15 then
4; >-15 but < 20 then 5

=if(A1>=1)+2*if(a1>=5)+if(a1>=10)+if(a1>=15)

You didn't say what to do if A1 is 20 or above.
 
Jill
You can do this with nested IF's but a VLOOKUP is much shorter

=VLOOKUP(A1,{0,0;1,1;5,3;10,4;15,5;20,""},2

This function has the table array directly inside it. If you prefer, you could enter the table on a sheet and reference that area. I didn't know what you wanted if the value is above 20 so I left it as a psuedo-blank

Good Luck
Mark Graesse
(e-mail address removed)

----- Jill Pleau > wrote: ----

I am working on a spreadsheet to calc our emps vacation time. Look a
cell A1 and if the contents are as follows give me the resultin
week

<1 then 0; >=1 but < 5 then 1; >=5 but < 10 then 3; >-10 but < 15 the
4; >-15 but < 20 then 5

Can't seem to figure out the proper sytax

Any help would be appreciated

TIA

Jil
 
I appreciate your response these replys have been helpful. I plan o
working on this problem this evening, but wanted to thank you both fo
your input.


Jil
 
Back
Top