Creating a formula to Search data set and return specific number

TexasTea

New Member
Joined
Apr 17, 2014
Messages
4
I have the below data set and I need that information to complete the below table. The below data set is a small example, where you see Cat 1, Cat 2, etc - there are actually 30 of these.
I need to fill in the below table, and need help creating the correct index, match or offset formula to complete this.

Thanks for any help you can provide.

The Data Set:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]Dollars[/TD]
[TD]Dollars[/TD]
[TD]Units[/TD]
[TD]Units[/TD]
[/TR]
[TR]
[TD]Categories[/TD]
[TD]Months[/TD]
[TD]Customer 1[/TD]
[TD]Market[/TD]
[TD]Customer 1[/TD]
[TD]Market[/TD]
[/TR]
[TR]
[TD]Cat 1[/TD]
[TD]Jan[/TD]
[TD]10,000[/TD]
[TD]50,000[/TD]
[TD]2,000[/TD]
[TD]12,000[/TD]
[/TR]
[TR]
[TD]Cat 1[/TD]
[TD]Feb[/TD]
[TD]20,000[/TD]
[TD]60,000[/TD]
[TD]4,000[/TD]
[TD]14,000[/TD]
[/TR]
[TR]
[TD]Cat 1[/TD]
[TD]Mar[/TD]
[TD]30,000[/TD]
[TD]70,000[/TD]
[TD]6,000[/TD]
[TD]16,000[/TD]
[/TR]
[TR]
[TD]Cat 2[/TD]
[TD]Jan[/TD]
[TD]5,000[/TD]
[TD]30,000[/TD]
[TD]1,000[/TD]
[TD]11,000[/TD]
[/TR]
[TR]
[TD]Cat 2[/TD]
[TD]Feb[/TD]
[TD]15,000[/TD]
[TD]35,000[/TD]
[TD]3,000[/TD]
[TD]13,000[/TD]
[/TR]
[TR]
[TD]Cat 2[/TD]
[TD]Mar[/TD]
[TD]25,000[/TD]
[TD]40,000[/TD]
[TD]5,000[/TD]
[TD]15,000[/TD]
[/TR]
[TR]
[TD]Cat 3[/TD]
[TD]Jan[/TD]
[TD]5,000[/TD]
[TD]10,000[/TD]
[TD]6,000[/TD]
[TD]11,000[/TD]
[/TR]
[TR]
[TD]Cat 3
[/TD]
[TD]Feb[/TD]
[TD]30,000[/TD]
[TD]35,000[/TD]
[TD]3,000[/TD]
[TD]12,000[/TD]
[/TR]
[TR]
[TD]Cat 3[/TD]
[TD]Mar[/TD]
[TD]5,000[/TD]
[TD]50,000[/TD]
[TD]6,000[/TD]
[TD]14,000[/TD]
[/TR]
[TR]
[TD]Cat 4[/TD]
[TD]Jan[/TD]
[TD]5,000[/TD]
[TD]60,000[/TD]
[TD]1,000[/TD]
[TD]12,000[/TD]
[/TR]
[TR]
[TD]Cat 4[/TD]
[TD]Feb[/TD]
[TD]10,000[/TD]
[TD]30,000[/TD]
[TD]1,000[/TD]
[TD]11,000[/TD]
[/TR]
[TR]
[TD]Cat 4[/TD]
[TD]Mar[/TD]
[TD]40,000[/TD]
[TD]70,000[/TD]
[TD]3,000[/TD]
[TD]16,000[/TD]
[/TR]
</tbody>[/TABLE]


Table:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Category[/TD]
[TD]Month[/TD]
[TD]Customer 1 Dollars[/TD]
[TD]Customer 1 Units[/TD]
[/TR]
[TR]
[TD]Cat 1[/TD]
[TD]Mar[/TD]
[TD](return the number 30,000)[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]Cat 1[/TD]
[TD]Feb[/TD]
[TD]?[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]Cat 2[/TD]
[TD]Mar[/TD]
[TD]?[/TD]
[TD]?[/TD]
[/TR]
[TR]
[TD]Cat 2[/TD]
[TD]Feb[/TD]
[TD]?[/TD]
[TD]?[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi,

This is strictly based on your sample, will probably need modifications since there are no provisions for Customer 2, 3, etc.


Book1
ABCDEF
1DollarsDollarsUnitsUnits
2CategoriesMonthsCustomer 1MarketCustomer 1Market
3Cat 1Jan10,00050,0002,00012,000
4Cat 1Feb20,00060,0004,00014,000
5Cat 1Mar30,00070,0006,00016,000
6Cat 2Jan5,00030,0001,00011,000
7Cat 2Feb15,00035,0003,00013,000
8Cat 2Mar25,00040,0005,00015,000
9Cat 3Jan5,00010,0006,00011,000
10Cat 3Feb30,00035,0003,00012,000
11Cat 3Mar5,00050,0006,00014,000
12Cat 4Jan5,00060,0001,00012,000
13Cat 4Feb10,00030,0001,00011,000
14Cat 4Mar40,00070,0003,00016,000
15
16
17Table:
18DollarsUnits
19CategoryMonthCustomer 1Customer 1
20Cat 1Mar300006000
21Cat 1Feb200004000
22Cat 2Mar250005000
23Cat 2Feb150003000
Sheet10
Cell Formulas
RangeFormula
C20=IF(C$2=C$19,SUMIFS(C$3:C$14,A$3:A$14,A20,B$3:B$14,B20),"")
D20=IF(E$2=D$19,SUMIFS(E$3:E$14,A$3:A$14,A20,B$3:B$14,B20),"")


C20 and D20 formulae copied down.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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