Excel Functions

G

Guest

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?
 
B

Bob Phillips

=(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 said:
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?
 
J

JE McGimpsey

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)
 

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