help with formula

R

Richard

If B16 (which is a date) is between January 1st. and June 30th. then 3
If B16 (which is a date) is between July 1st. and September 30th then 2
If B16 (which is a date) is between October 1st. and December 31st. then 0
If B16 > 5 years then 4
Thanks in advance for any help!!
 
F

Franz Verga

Richard said:
If B16 (which is a date) is between January 1st. and June 30th. then 3
If B16 (which is a date) is between July 1st. and September 30th then 2
If B16 (which is a date) is between October 1st. and December 31st. then 0
If B16 > 5 years then 4
Thanks in advance for any help!!

I don't understand the last if. What do you mean with
If B16 > 5 years then 4 ?



--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 
D

Dave F

=if(and(b16>date(2006,01,01),b16<2006,06,30),3,if(and(b16>date(july
1st),b16<(September 30th),2,etc.
 
R

Richard

B16 is formatted as a date and never changes, Example 7/31/06, If TODAYS
DATE is 1/1/2011 or greater then 4
 
F

Franz Verga

Richard said:
B16 is formatted as a date and never changes, Example 7/31/06, If
TODAYS DATE is 1/1/2011 or greater then 4

Hi Richard,
try this:

=IF(YEAR(TODAY())-YEAR(B16)>5,4,IF(AND(B16>=DATE(YEAR(B16),1,1),B16<=DATE(YEAR(B16),6,30)),3,IF(AND(B16>=DATE(YEAR(B16),7,1),B16<=DATE(YEAR(B16),9,30)),2,IF(AND(B16>=DATE(YEAR(B16),10,1),B16<=DATE(YEAR(B16),12,31)),0,""))))


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 
M

MyVeryOwnSelf

If B16 (which is a date) is between January 1st. and June 30th. then 3
If B16 (which is a date) is between July 1st. and September 30th then
2 If B16 (which is a date) is between October 1st. and December 31st.
then 0 If B16 > 5 years then 4

Maybe this gets what you want:

=IF(B16>DATE(YEAR(TODAY())+5,MONTH(TODAY()),DAY(TODAY())),4,
2*(MONTH(B16)<10)+(MONTH(B16)<7))
 

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

Similar Threads


Top