PoggiPJ
Active Member
- Joined
- Mar 25, 2008
- Messages
- 330
I use the following formula to sum amounts from two ranges.
If H12 contains a "Y", then add to V12 the amount in the UnitPriceColumn in any row where the PartNoColumn matches the part number in D12.
This currently works, but it adds the amount in UnitPriceColumn any time PartNoColumn matches D12.
I would like to add a second conditional test to the formula where the UnitPriceColumn amount is only added when UnitPriceColumn matches D12, AND another, SubYNColumn = "Y". I am not sure how to add this second condition.
Note: I don't think it matters, but UnitPriceColumn, PartNumberColumn, and SubYNColumn all refer to columns in a different range from H12, V12, and D12.
If H12 contains a "Y", then add to V12 the amount in the UnitPriceColumn in any row where the PartNoColumn matches the part number in D12.
Code:
=IF(UPPER(H12) = "Y",V12+SUMIF(PartNoColumn,D12,UnitPriceColumn),0)
I would like to add a second conditional test to the formula where the UnitPriceColumn amount is only added when UnitPriceColumn matches D12, AND another, SubYNColumn = "Y". I am not sure how to add this second condition.
Note: I don't think it matters, but UnitPriceColumn, PartNumberColumn, and SubYNColumn all refer to columns in a different range from H12, V12, and D12.