Forum Discussion
Tony2021
Apr 21, 2023Iron Contributor
SumIF (2 criteria & currency conversion)
Hello experts, Please see attached example file. I need to sum an [Amount] if the [Type] column = *Liquid* but only if the [Paid Date] is null. But I also need to convert the [Amount] if the c...
- Apr 21, 2023
I'd create a lookup range. In the attached workbook it is in O2:P4 but it can be anywhere, even on another sheet.
(P2 contains the formula =1/6.7)
You can then use the formula
=SUMPRODUCT(C2:C5,XLOOKUP(B2:B5,O2:O4,P2:P4),(D2:D5="Liquid")*(E2:E5=""))
If you don't have Microsoft 365 or Office 2021:
=SUMPRODUCT(C2:C5,VLOOKUP(B2:B5,O2:P4,2,FALSE),(D2:D5="Liquid")*(E2:E5=""))
Patrick2788
Apr 21, 2023Silver Contributor
My variant:
=LET(
dkk, SUMIFS(amt, curr, "DKK", type, "Liquid", paid, "") / 6.7,
eur, SUMIFS(amt, curr, "EUR", type, "Liquid", paid, "") * 1.1,
dkk + eur
)
Tony2021
Apr 21, 2023Iron Contributor
amazing. Both work. I dont know which one to mark as best answer. ?
- HansVogelaarApr 22, 2023MVP
Just pick one - it doesn't matter which one.