Multiple If Average

Silvermini63

Active Member
Joined
Sep 25, 2006
Messages
293
OK I need to find out the average of column “G” form person 1 (E1) if the type in column “J” is either “Modified Price” or “New Entry” so the average for Person 1 should be 13.62
Any help would be appreciated as I just cannot get my head around this one.
Excel Workbook
ABCDEFGHIJ
1Person 1
2Person 2
3CustomerNameItemDescriptionValueCostGM%UseridConcatenateType
4XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx25.05Person 1XXXXXXXXXXXExpired
5XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx23.02Person 1XXXXXXXXXXXExpired
6XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx29.70Person 1XXXXXXXXXXXExpired
7XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx15.33Person 1XXXXXXXXXXXNew Entry
8XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx17.42Person 1XXXXXXXXXXXModified Price
9XXXXXXCust2XXXXXXXXXXXXxx.xxxx.xx8.12Person 1XXXXXXXXXXXModified Price
10XXXXXXCust3XXXXXXXXXXXXxx.xxxx.xx20.95Person 2XXXXXXXXXXXExpired
11XXXXXXCust3XXXXXXXXXXXXxx.xxxx.xx38.36Person 2XXXXXXXXXXXExpired
12XXXXXXCust3XXXXXXXXXXXXxx.xxxx.xx26.15Person 2XXXXXXXXXXXExpired
13XXXXXXCust4XXXXXXXXXXXXxx.xxxx.xx12.15Person 2XXXXXXXXXXXModified Price
14XXXXXXCust5XXXXXXXXXXXXxx.xxxx.xx11.11Person 2XXXXXXXXXXXNew Entry
15XXXXXXCust6XXXXXXXXXXXXxx.xxxx.xx30.00Person 2XXXXXXXXXXXModified Price
610 (2)
Excel 2010
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try this:
=SUMPRODUCT(--((J4:J15="New Entry")+(J4:J15="Modified Price")),--(H4:H15=E1),(G4:G15))/SUMPRODUCT(--((J4:J15="New Entry")+(J4:J15="Modified Price")),--(H4:H15=E1))
 
Upvote 0
In column K you can put in the following formula in cell K4:

=IF(J4="Modified Price", G4,IF(J4="New Entry", G4,""))

Then copy the formula down to each row in column K. Then you can do an average of the range in column K for person 1. Excel won't count the blanks in the average, so if the cell in column J doesn't equal Modified Price or New Entry it will leave column K blank.

Probably not the best way, but it'll work.
 
Upvote 0
OK I need to find out the average of column “G” form person 1 (E1) if the type in column “J” is either “Modified Price” or “New Entry” so the average for Person 1 should be 13.62
Any help would be appreciated as I just cannot get my head around this one.

Excel Workbook
ABCDEFGHIJ
1Person 1
2Person 2
3CustomerNameItemDescriptionValueCostGM%UseridConcatenateType
4XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx25.05Person 1XXXXXXXXXXXExpired
5XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx23.02Person 1XXXXXXXXXXXExpired
6XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx29.70Person 1XXXXXXXXXXXExpired
7XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx15.33Person 1XXXXXXXXXXXNew Entry
8XXXXXXCust1XXXXXXXXXXXXxx.xxxx.xx17.42Person 1XXXXXXXXXXXModified Price
9XXXXXXCust2XXXXXXXXXXXXxx.xxxx.xx8.12Person 1XXXXXXXXXXXModified Price
10XXXXXXCust3XXXXXXXXXXXXxx.xxxx.xx20.95Person 2XXXXXXXXXXXExpired
11XXXXXXCust3XXXXXXXXXXXXxx.xxxx.xx38.36Person 2XXXXXXXXXXXExpired
12XXXXXXCust3XXXXXXXXXXXXxx.xxxx.xx26.15Person 2XXXXXXXXXXXExpired
13XXXXXXCust4XXXXXXXXXXXXxx.xxxx.xx12.15Person 2XXXXXXXXXXXModified Price
14XXXXXXCust5XXXXXXXXXXXXxx.xxxx.xx11.11Person 2XXXXXXXXXXXNew Entry
15XXXXXXCust6XXXXXXXXXXXXxx.xxxx.xx30.00Person 2XXXXXXXXXXXModified Price
610 (2)
Excel 2010
Try this array formula**.

Criteria:
  • E1 = Person 1
  • F1 = Modified Price
  • G1 = New Entry
Array entered**:

=AVERAGE(IF(H4:H15=E1,IF(ISNUMBER(MATCH(J4:J15,F1:G1,0)),G4:G15)))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,331
Members
452,907
Latest member
Roland Deschain

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