![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Hi all
I have a list of over 10k lines that include multiple groups. Within these groups are the columns "MEMBER", "TYPES", and "AMOUNTS". The TYPE is either a TC or 26. Regardless how many lines are within a single group, all amounts that are less than the highest amount has a discount applied to it based on the TYPE. TC types have a 50% discount applied to each amount that are less than the highest amount while type 26 has a 25% discount applied to them. Is there a formula that would allow me to do that? I am attaching a file with an example of what my intentions are. Thanks |
#2
|
|||
|
|||
![]()
Paste in D2 and drag down column :
Code:
=IF(B2="TC",C2-(C2*0.5),C2-(C2*0.25)) |
#3
|
|||
|
|||
![]()
See https://exceljet.net/formula/max-if-criteria-match
Try this array formula in E2 to get the discount Code:
=IF($C2<MAX(IF($A$2:$A$20=$A2,$C$2:$C$20)),IF($B2="TC",0.5,0.25)*$C2,0) and drag down |
#4
|
|||
|
|||
![]()
Thanks NoSparks
This was VERY helpful. Unfortunately though, the highest number should not calculate and populate, its only those that are less than it. I am not sure what you mean by "confirmed with Shift+Ctrl+Enter not just Enter and drag down". I thought perhaps thats why the high number is being populated because when I do the "Shift+Ctrl+Enter not just Enter nothing happens. |
#5
|
|||
|
|||
![]() Quote:
as you can see from the link included the MAX(IF portion of the formula is an array formula when you enter a 'normal' formula into a cell you just hit Enter for Excel to accept it with an array formula you have to hit Shift+Ctrl+Enter all at the same time for Excel to accept it as an array formula and Excel will automatically add the { and } to the formula. drag down... click and hold on that little square in the lower right corner of the cell and pull it down the column to copy the formula to those cells Hope that helps. |
#6
|
|||
|
|||
![]()
Thanks NoSparks, that did the trick and it work out perfectly. I truley appreciate all of your help
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
append multiple time values to date in one column | sarahafeez | Excel | 1 | 09-25-2017 11:01 PM |
2-Column layout breakes with images/groups | ben-in-m | Word | 0 | 06-02-2017 01:26 PM |
Multiple found values from five sheets, multiple returned values in sheet six? | irisha | Excel Programming | 26 | 09-30-2016 01:20 AM |
![]() |
EddyWD | Excel | 3 | 04-20-2016 09:29 PM |
![]() |
pachmarhi | Excel | 3 | 07-18-2014 09:57 PM |