Using the If function for a date range

J

Jon Keym

Hi,
I was wondering if anyone could please help me.

I'm trying to set up a formular that says if A1 (which is a date) i
between 01/01/2012-31/12/12 then B1 will say "2012".
If A1 is between 01/01/2013-31/12/2013 then B1 will say "2013" and s
on.

Can anyone suggest the best way of doing this?

Thanks,

Jon
 
C

Claus Busch

Hi Jon,

Am Wed, 30 Jan 2013 12:04:20 +0000 schrieb Jon Keym:
I'm trying to set up a formular that says if A1 (which is a date) is
between 01/01/2012-31/12/12 then B1 will say "2012".
If A1 is between 01/01/2013-31/12/2013 then B1 will say "2013" and so
on.

in B1 try:
=YEAR(A1)


Regards
Claus Busch
 
K

Kevin@Radstock

Hi Jon Keym

If the date in A1 is a proper date & not text. Then the following
formula in B1 should suit your requirement.

=YEAR(A1)
 
J

Jon Keym

Kevin@Radstock;1609005 said:
Hi Jon Keym

If the date in A1 is a proper date & not text. Then the following
formula in B1 should suit your requirement.

=YEAR(A1)

Works perfectly. Thanks very much.
 

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