Lookup value and sum cells

Jan Hoffmann

New Member
Joined
Jun 27, 2007
Messages
17
Hello,

I'm stuck with a lookup-problem. I have a table showing monthly sales for customers with "Customer Name" in column A and month in the header row.

So now I want to do a Moving Annual Total lookup function, which for a given month and customer, look up the sales for the given month and accumulate it with the previous 11 month, so that it shows a 12-month total. Eg. typing in Customer Z and the month January 2009, the calculated cell returns the total sale for customer Z in the period February 2008 to January 2009.

I hope you can help me with this problem - Thank you in advance!

Best regards

Jan Hoffmann
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi Jan

Try:

=SUM(INDEX(DataTable,MATCH(Customer,$A$2:$A$100,0),MATCH(Month,$B$1:$IV$1,0)):INDEX(DataTable,MATCH(Customer,$A$2:$A$100,0),MAX(1,MATCH(Month,$B$1:$IV$1,0)-12)))

Replace ranges/values to suit.
 
Upvote 0
Hello guys,

@xld: Yes, it's true dates

@Richard: You've nailed that one - Problem solved - very good and thank you very much!

Best regards

Jan Hoffmann
 
Upvote 0

Forum statistics

Threads
1,222,902
Messages
6,168,938
Members
452,227
Latest member
sam1121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top