Date Calculation

S

Samir

I need to write a formula or VB code for the following:

Say Column A contains dates and column B amounts.
In column C, I need to calculate 10% of column B if the
date in Column a is between 1 April and 30 September. If
the date in column A is between 1 October and 31 March
then calculate 15%. The problem is it need to work for any
year and the date in column a will be in the format of
dd/mm/yyyy.

Your help will be much appreciated. Many Thanks in advance.
 
A

Arvi Laanemets

Hi

Into cell C2 enter the formula
=IF(AND(MONTH(A2>3,MONTH(A2<10))),0.1*B2,0.15*B2)
and copy it down
 
B

Bob Phillips

Samar,

Put your variable year in G1 and use this formula

=IF(AND(A1>=DATE($G$1,4,1),A1<=DATE($G$1,9,30)),B1*10%,B1*15%)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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