Forum Discussion
jhcj
Dec 05, 2024Copper Contributor
Mutiplying values based on criteria
Hi all, appreciate some help. I'm trying to get excel to multiply values in column M with column G based on criterias in column E and F. For example, If item type is 20DV and category is Y, the...
- Dec 05, 2024
so there are few ways and assuming you don't need any particular exceptions for having combinations that don't exist or have multiple options your could use FILTER. I will use [ ] to indicate the related cells on that sheet and LU[ ] to indicate the LookUp table values so something like:
=[# cont] * FILTER( LU[multiplier], (LU[type]=[Cont type])*(LU[category]=[ODG]), 0)but that said I like where Peter was going with using a formula to calculate the multiplier instead of a lookup. Based on the pattern I see I might say:
=LET( TypeFactor, IFERROR( LEFT( [Cont type], 1) / 2 , 0), CatFactor, SWITCH( [ODG], "Y", 2 , "N", 1 , "OHOW", 4, "OHOW2", 6 , 0), [# cont] * TypeFactor * CatFactor )
Kidd_Ip
Dec 06, 2024MVP
Please tr on below:
=IF(AND(E2="20DV", F2="Y"), M2*2, IF(AND(E2="40ST", F2="Y"), M2*4, ""))