# If column D is after year 2010 quick question

Closed
-
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
-
If column D= year 2010
then column K = column E divided by 6
if column D is after year 2010
then column K =column E divided by 3.

How would I write that in excel for a formula?

Thanks in advanced to anyone who can help me out!

## 2 replies

Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
803
what did you enter in D1(remember it is not D but D1 a cekk)
is it "year 2010"
or
2010
or
1/1/2010
and format it only as year.

I suppose you have just entered the number 2010 (not date and not string with a word before )

in K1 you type or copy this formula

=IF(D1=2010,D1/6,IF(D1>2010,D1/3,""))
the date is in 1/1/2010 format and excel can't look at that and evalute it. it keeps saying it's false.
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
803
if the entry is as mm/dd/yy and formatted as d/m/yyyy in cell D1 then
=year(D1) gives 2010

the formula will be

=if(year(d1)=2010,E1/6,if(year(D1)>2010,E1/3,""))

if you enter any date in D1 in the year 2010 it will give E1(repeat E1) divided by 6
if the year is later than 2010 it will give E1/3.