• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

ytd values based on 3 criteria

Hi,
I am trying to compute YTD values based on 3 criteria (Account ID, Month, and Year)

I have a tab with units sold data, one tab with ledger_data which has all the sales with account id.

In the sales tab I want to compute YTD values (Units and Dollar values) based on Account ID, Year and Month)

If I change the Year and Month the highlighted red cells should reflect the year and the months. Example Year 2017 and if I enter Jul, the Units and Dollar amounts should sum from JAN to JULY.

I have attached a sample sheet.

Thanks for all your help.
 

Attachments

  • chandooytd.xlsx
    33.2 KB · Views: 4
Last edited:
Perhaps..............

1] In AO5, copied down :

=IF($D5="","",SUMIF($D$5:INDEX($D$5:$AK$5,MATCH($AO$2,$E$3:$AL$3,0)),"UNITS",$E5))

2] Click dropdown list in cell AO2 to select month of the year, and check the values changing

Regards
Bosco
 

Attachments

  • chandooytd(1).xlsx
    34 KB · Views: 5
Mr. Bosco,
I have one more change to the format of the spreadsheet. If I change the direction of the month on the top that is from JAN FEB MAR to MAR FEB JAN, the formula is calculating only the MAR values. Can you help me with this issue.

Thanks
 

Attachments

  • chandooytdsolved(1).xlsx
    33.9 KB · Views: 3
Last edited by a moderator:
I forgot to mention that I plan to use this as a 3 month report from the current month. For example if this is MAR, the report would start from MAR FEB JAN.

If the month is OCT, the report will start from OCT SEP AUG.

Thanks.
 
Last edited by a moderator:
Mr. Bosco,
I have one more change to the format of the spreadsheet. If I change the direction of the month on the top that is from JAN FEB MAR to MAR FEB JAN, the formula is calculating only the MAR values. Can you help me with this issue.

Thanks
In AO5, copied down :

=IF($D5="","",SUMIF(OFFSET($J$5,,,,MATCH($AO$2,$E$3:$K$3,0)-8),"UNITS",OFFSET($L5,,MATCH($AO$2,$E$3:$K$3,0)-8)))

Regards
Bosco
 

Attachments

  • chandooytdsolved(2).xlsx
    34 KB · Views: 9
Back
Top