Based on Multiple Criteria Pick data from Total Sales Row

hananak

Board Regular
Joined
Feb 10, 2022
Messages
110
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Dear All,

I need your help to come up with a formula where it should pick the Total sales based on two criteria. 1) Month and 2) Customer Name.

The total sales row is after every two products within their respective tables. If a new product is added, then in each customer table will have all the products.

Please see the picture, to better understand.

I would appreciate your help.
 

Attachments

  • Picture2.png
    Picture2.png
    134.3 KB · Views: 13

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hello - if you convert your range to a table range calling each Customer_A and Customer_B respectively and insert a column next to your data in column A with a header Customer, so something like this on each

Customer. Products. M1. M2. M3 etc
Customer A. Product A
Customer A. Product B

Lookup Info;

Customer A. Month M9 (Data Validation)

Then try this;

=SUMIFS(INDEX(Customer Range Of Numbers]], , MATCH(Pick Up Month No (eg M9, Customer Headers Of Month Range, 0)), Customer A[Customer] Range, Customer A

Hope this helps.
 
Upvote 0
Hello - if you convert your range to a table range calling each Customer_A and Customer_B respectively and insert a column next to your data in column A with a header Customer, so something like this on each

Customer. Products. M1. M2. M3 etc
Customer A. Product A
Customer A. Product B

Lookup Info;

Customer A. Month M9 (Data Validation)

Then try this;

=SUMIFS(INDEX(Customer Range Of Numbers]], , MATCH(Pick Up Month No (eg M9, Customer Headers Of Month Range, 0)), Customer A[Customer] Range, Customer A

Hope this helps.
Thanks for your reply.

The problem is that I cannot make any changes to the source data nor add additional columns or convert the data to tables.

do we have alternative solution?
 
Upvote 0
OK try;

=SUM(OFFSET(A1,1, MATCH(Month No, Date Range, 0), 3, 1))

A1 is the starting point for the OFFSET which is Customer A.
 
Upvote 0
Hello - if you convert your range to a table range calling each Customer_A and Customer_B respectively and insert a column next to your data in column A with a header Customer, so something like this on each

Customer. Products. M1. M2. M3 etc
Customer A. Product A
Customer A. Product B

Lookup Info;

Customer A. Month M9 (Data Validation)

Then try this;

=SUMIFS(INDEX(Customer Range Of Numbers]], , MATCH(Pick Up Month No (eg M9, Customer Headers Of Month Range, 0)), Customer A[Customer] Range, Customer A

Hope this helps.

OK try;

=SUM(OFFSET(A1,1, MATCH(Month No, Date Range, 0), 3, 1))

A1 is the starting point for the OFFSET which is Customer A.
We have to match the
OK try;

=SUM(OFFSET(A1,1, MATCH(Month No, Date Range, 0), 3, 1))

A1 is the starting point for the OFFSET which is Customer A.
I need to match cuatomer names as well.
 
Upvote 0
OK, how about;

=SUM(OFFSET(A1,MATCH(Product No, Product Range, 0), MATCH(Month No, Month Range,0), 3, 1)).

This will give per total sales say of Month 9 of 135 but if you just wanted say Month 8 total only for Product A, just change the above formula from a 3 to a 2 after the Month Range, this would give you 80 for Month 9 in this example.
 
Upvote 0
OK, how about;

=SUM(OFFSET(A1,MATCH(Product No, Product Range, 0), MATCH(Month No, Month Range,0), 3, 1)).

This will give per total sales say of Month 9 of 135 but if you just wanted say Month 8 total only for Product A, just change the above formula from a 3 to a 2 after the Month Range, this would give you 80 for Month 9 in this example.
Sorry, it's not working.
 
Upvote 0
Try this on each;

=SUM(OFFSET(A1,MATCH(Customer A, A:A,0), MATCH(Month No, Month Range, 0),3,1)).

I have just tried this now and based on your answers on your question for Month 9, this will provide you with;

Customer A. Month 9. 135
Customer B. Month 9. 150
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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