#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bmo bmo is offline
external usenet poster
 
Posts: 7
Default IF Formula

I have an if formula "=IF(B2=2006,15)" which works fine, but I would like to
expand it to also include "=IF(B2=2007,30)", but I can't figure out how to
write it. I would even like "=IF(B2=2008,45)" if its possible.

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 638
Default IF Formula

=IF(B2=2006,15,IF(B2=2007,30,IF(B2=2008,45,"no match")))

bmo wrote:
I have an if formula "=IF(B2=2006,15)" which works fine, but I would like to
expand it to also include "=IF(B2=2007,30)", but I can't figure out how to
write it. I would even like "=IF(B2=2008,45)" if its possible.

Thanks,


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default IF Formula

On Oct 10, 6:34 pm, bmo wrote:
I have an if formula "=IF(B2=2006,15)" which works fine, but I would like to
expand it to also include "=IF(B2=2007,30)", but I can't figure out how to
write it. I would even like "=IF(B2=2008,45)" if its possible.

Thanks,


If you only have a few years to check you could indeed use the if-
function, like this:
=IF(B2=2006;15;IF(B2=2007;30;IF(B2=2008;45;"")))

If you have many years, or as time goes by, I would consider a table
and the vlookup-function.

Per Erik

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default IF Formula

hi
=if(B2=2006,15,if(B2=2007,30,if(B2=2008,45,0)))
you can nest up to 7 ifs within an if statement. you can have more but that
reguires using more that 1 if statement and that can get tricky.

Regards
FSt1

"bmo" wrote:

I have an if formula "=IF(B2=2006,15)" which works fine, but I would like to
expand it to also include "=IF(B2=2007,30)", but I can't figure out how to
write it. I would even like "=IF(B2=2008,45)" if its possible.

Thanks,

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default IF Formula

Try this:

=(B2-2005)*15


"bmo" wrote:

I have an if formula "=IF(B2=2006,15)" which works fine, but I would like to
expand it to also include "=IF(B2=2007,30)", but I can't figure out how to
write it. I would even like "=IF(B2=2008,45)" if its possible.

Thanks,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"