transferring amount to particular month column

T

Tiya

=IF($B13="","",IF(CHOOSE(MONTH($B13),"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")=H$2,$G13,""))

Using This function i am transferring amount to particular month column but
when there is a same month but year is change than also it goes to that
month, i want if there is year change it should goto that year column.

I have data for year 2004,2005 & 2006 so i have created 36 column for every
month.

Is there any way?

Thanks
tiya
 
D

daddylonglegs

You don't really need Choose. Your current formula could be

=IF($B13="","",IF(TEXT($B13,"mmm")=H$2,$G13,""))

Now, to change the formula to identify the year....

If you input your headers as "jan-04", "feb-04" etc. excel shoul
recognise these as dates and you can use

=IF($B13="","",IF($B13-Day($B13)+1=H$2,$G13,"")
 
D

daddylonglegs

.....in fact you don't even need the first IF function - this woul
suffice

=IF($B13-DAY($B13)+1=H$2,$G13,""
 

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