![]() |
Excel Functions
I have a group of mutually exclusive If statements that I want to exercise in
a cell. Specifically, if the year is 2005 I want to return one value, if the year is 2006, I want to return another, etc. Can't see how to do this simply without creating a giant nesting of If statements. Anyone have suggestions? |
=(YEAR(TODAY())-2004)*some_value
as a starting guess, a bit light on detail -- HTH RP (remove nothere from the email address if mailing direct) "sfs" wrote in message ... I have a group of mutually exclusive If statements that I want to exercise in a cell. Specifically, if the year is 2005 I want to return one value, if the year is 2006, I want to return another, etc. Can't see how to do this simply without creating a giant nesting of If statements. Anyone have suggestions? |
Without knowing more about the conditions and results, I'd suggest using
VLOOKUP from a table of corresponding values. J K 1 YEAR VALUE 2 2005 value1 3 2006 value2 .... 20 2024 value20 =VLOOKUP(YEAR(A1), J:K, 2, FALSE) In article , sfs wrote: I have a group of mutually exclusive If statements that I want to exercise in a cell. Specifically, if the year is 2005 I want to return one value, if the year is 2006, I want to return another, etc. Can't see how to do this simply without creating a giant nesting of If statements. Anyone have suggestions? |
VLOOKUP() is probably a better choice rather than using IF(). sfs Wrote: I have a group of mutually exclusive If statements that I want to exercise in a cell. Specifically, if the year is 2005 I want to return one value, if the year is 2006, I want to return another, etc. Can't see how to do this simply without creating a giant nesting of If statements. Anyone have suggestions? -- Morrigan ------------------------------------------------------------------------ Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094 View this thread: http://www.excelforum.com/showthread...hreadid=391032 |
All times are GMT +1. The time now is 03:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com