Formula, add data if co

The Power Loon

New Member
Joined
Feb 7, 2020
Messages
34
Office Version
  1. 365
Platform
  1. Windows
I have an issue i'm trying to work out. Whenever the term "addon" is found in the Description column, I want its "Price" added in the Extra column where ever the Group ID is the same.

Below, you can see that $50.00 had been added in the Extra column for every row with the same GroupID as the "addon".

DescriptionGroup IDPriceExtra
product 1hhh
$3,467.00​
addonyyy
$50.00
$50.00
product 2yyy
$454.80​
$50.00
product 3yyy
$67.99​
$50.00
product 1kkk
$3,467.00​
product 4kkk
$456.00​

Unfortunately, I haven't been able to work out a functional formula. Is this even possible outside of VBA?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
What if there is more than 1 addon row with the same group ID and differente Price? Or is this combination not possible?
 
Upvote 0
If only one possible result then try this in D2 and drag down:

Excel Formula:
=IFERROR(FILTER($C$2:$C$26,($A$2:$A$26="Addon")*($B$2:$B$26=B2)),"")

1705096429830.png
 
Upvote 0
If only one possible result then try this in D2 and drag down:

Excel Formula:
=IFERROR(FILTER($C$2:$C$26,($A$2:$A$26="Addon")*($B$2:$B$26=B2)),"")

View attachment 104892
You can just add SUM in there to get multiple addons if they should be combined:

Book1
ABCDE
1DescriptionGroup IDPriceExtra
2product 1hhh$ 3,467.00
3addonyyy$ 50.00$50.00$ 125.00
4product 2yyy$ 454.80$50.00$ 125.00
5product 3yyy$ 67.99$50.00$ 125.00
6product 1kkk$ 3,467.00
7product 4kkk$ 456.00
8addonyyy$ 75.00$ 125.00
Sheet7
Cell Formulas
RangeFormula
E2:E8E2=IFERROR(SUM(FILTER($C$2:$C$26,($A$2:$A$26="Addon")*($B$2:$B$26=B2))),"")
 
Upvote 0
Solution
Sure. Or maybe he wants the max or min value... dunno. that's why I asked.
 
Upvote 0
You can just add SUM in there to get multiple addons if they should be combined:

Book1
ABCDE
1DescriptionGroup IDPriceExtra
2product 1hhh$ 3,467.00
3addonyyy$ 50.00$50.00$ 125.00
4product 2yyy$ 454.80$50.00$ 125.00
5product 3yyy$ 67.99$50.00$ 125.00
6product 1kkk$ 3,467.00
7product 4kkk$ 456.00
8addonyyy$ 75.00$ 125.00
Sheet7
Cell Formulas
RangeFormula
E2:E8E2=IFERROR(SUM(FILTER($C$2:$C$26,($A$2:$A$26="Addon")*($B$2:$B$26=B2))),"")
It works. Thank you for your time on this.
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,077
Members
449,094
Latest member
mystic19

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