Creating a find, match, lookup, and return formula

Pestomania

Active Member
Joined
May 30, 2018
Messages
332
Office Version
  1. 365
Platform
  1. Windows
I am struggling to get a formula to work that allows me to find a value "A" and return all valuations based on that.

In the below example, I have provided some details but I need to understand how to get a count of Program 1-4 based on the "A" and then multiple those counts by the appropriate decimal value.

Not sure this makes a lot of sense, but please let me know.

Prestons Playground for Modeling.xlsx
ABCDEFGH
1Program NameDecimal Point
2Program 1AProgram 10.5
3Program 1BProgram 21
4Program 1AProgram 30.75
5Program 2AProgram 40.3
6Program 2C
7Program 3B
8Program 4D
9
10AProgram 10.51Here is my problem: A should be returning total of 2 (2 Program 1 & 1 Program 2) My Index Match only finds the first instance that "A" appears, but I need to find all instances that it appears and multiples the count by program by decimal point.
11BProgram 10.50.5
12CProgram 211
13DProgram 40.30.3
Sheet3
Cell Formulas
RangeFormula
B10:B13B10=INDEX($A$2:$A$8,MATCH(A10,$B$2:$B$8,0))
C10:C13C10=SUMPRODUCT((B10=$E$2:$E$5)*$F$2:$F$5)
D10:D13D10=COUNTIFS($A$2:$A$8,B10,$B$2:$B$8,A10)*C10
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
In cell B11 type =SUM(SUMIF($E$1:$E$8,TRANSPOSE(CHOOSECOLS(FILTER($A$2:$B$8,$B$2:$B$8=A10),1)),$F$1:$F$8))
It gets 2
 
Upvote 0
Try this:

Book1
ABCDEF
1Program NameDecimal Point
2Program 1AProgram 10.5
3Program 1BProgram 21
4Program 1AProgram 30.75
5Program 2AProgram 40.3
6Program 2C
7Program 3B
8Program 4D
9
10A2Program 1 X 2, Program 2 X 1
11B1.25Program 1 X 1, Program 3 X 1
12C1Program 2 X 1
13D0.3Program 4 X 1
Sheet1
Cell Formulas
RangeFormula
B10:B13B10=SUM(COUNTIFS($A$2:$A$8,$E$2:$E$5,$B$2:$B$8,A10)*$F$2:$F$5)
D10:D13D10=LET(c,COUNTIFS($A$2:$A$8,$E$2:$E$5,$B$2:$B$8,A10),TEXTJOIN(", ",1,IF(c,$E$2:$E$5&" X "&c,"")))


The B formula just gives the result, the D formula is if you want the breakdown.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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