SumIFs based on multiple conditions and multiply by a value if certain text present

questforexcel

Board Regular
Joined
Jan 18, 2019
Messages
128
Office Version
  1. 2013
Platform
  1. Windows
Hi All,

I am hoping you could help on this one.

I need my formula to search 2 columns in excel.

One column is based on the asset type. The other is based on the currency.

I need my formula to return the total by asset type and in SGD equivalent currency.

From my larger data set, i am trying this formula = SUMIFS($B$35:$T$39,L$35:L$39,$C8,I$35:I$39,"USD",I$35:I$39,"CAD",I$35:I$39,"GBP") but it returns the value error.

The above formula is not complete. I want my formula to multiply by the USD FX rate, if asset is in USD, GBP FX rate, if in GBP and CAD FX Rate, if in CAD.

Could you please help guide me on how to use a formula which can sum if based on the multiple criterias and multiply the individual USD, CAD, GBP numbers while summing them up. So that I can arrive at the SGD Equivalent number.

Is this possible?

I am not able to download or enable XL2BB on laptop. Apologies for any inconvenience.

USD
1.35​
GBP
1.67​
CAD
1.00​
Asset TypeLocationName of AssetCurrencyAmountSGD
MachineryNew JerseyGeneratorUSD135,000100,000
MachineryMinneapolisUPSUSD270,000200,000
LaptopLondonGBP167,000100,000
BuildingsManchesterTowerGBP334,000100,000
LandOttawaCAD200,000200,000
Total in Reporting Currency1,106,000
Total in SGD Equivalent700,000
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi
Sorry, Not clear with your query
Can you post some data on how your data looks like including all the ranges you have used in the formula.
 
Upvote 0
Hi,

Thank you for your response.

I have records of data assets across different locations in different source currencies.

I am looking to find a way to sum the total by asset type and the SGD equivalent currency.

In order for it to be shown in the SGD Equivalent currency, i think I would need the formula to lookup the foreign currency values and multiply by them by their respective FX rate to SGD.

This is the formula that I have included below. But I have not been able to multiply the individual USD, GBP, CAD amounts by their respective exchange rates in the formula. May be sumifs isnt the right formula here?

Would appreciate any help / guidance here. Thank you very much

=SUMIFS($B$9:$H$20,B$9:B$20,B$2,H$9:H$20,J$1,H$9:H$20,J$2,H$9:H$20,J$3)


SummarySGD EquivalentUSD
1.35​
Machinery
#VALUE!​
GBP
1.67​
LaptopsCAD
1.00​
Fixtures
2​
3​
4​
Amount in Source (Local) Currency
Asset TypeLocationCurrency
Jan-23​
Feb-23​
Mar-23​
YTD Total
MachineryNew JerseyUSD135,000270,000405,000810,000
MachineryMinneapolisUSD270,000540,000810,0001,620,000
FixturesLondonGBP167,000334,000501,0001,002,000
FixturesManchesterGBP334,000668,0001,002,0002,004,000
FixturesOttawaCAD200,000400,000600,0001,200,000
MachineryLondonGBP167,000334,000501,0001,002,000
MachineryLondonGBP167,000334,000501,0001,002,000
LaptopsMinneapolisUSD135,000270,000405,000810,000
LaptopsMinneapolisUSD135,000270,000405,000810,000
LaptopsMinneapolisUSD135,000270,000405,000810,000
LaptopsMinneapolisUSD135,000270,000405,000810,000
LaptopsMinneapolisUSD135,000270,000405,000810,000
 

Attachments

  • 1679327097645.png
    1679327097645.png
    56 KB · Views: 9
Upvote 0
i'm assuming you are looking for each summary as ytd?
if you can add a single helper column as i have the YTD SGD Equivalent shown below, then this may work for you:

Book1
ABCDEFGHIJ
1SummarySGD EquivalentUSD1.35
2Machinery3000000.00GBP1.67
3Laptops3000000.00CAD1.00
4Fixtures3000000.00
5Amount in Source (Local) Currency
6Asset TypeLocationCurrencyYTD SGD EquivalentJan-23Feb-23Mar-23YTD Total
7MachineryNew JerseyUSD600000.00135000.00270000.00405000.00810000.00
8MachineryMinneapolisUSD1200000.00270000.00540000.00810000.001620000.00
9FixturesLondonGBP600000.00167000.00334000.00501000.001002000.00
10FixturesManchesterGBP1200000.00334000.00668000.001002000.002004000.00
11FixturesOttawaCAD1200000.00200000.00400000.00600000.001200000.00
12MachineryLondonGBP600000.00167000.00334000.00501000.001002000.00
13MachineryLondonGBP600000.00167000.00334000.00501000.001002000.00
14LaptopsMinneapolisUSD600000.00135000.00270000.00405000.00810000.00
15LaptopsMinneapolisUSD600000.00135000.00270000.00405000.00810000.00
16LaptopsMinneapolisUSD600000.00135000.00270000.00405000.00810000.00
17LaptopsMinneapolisUSD600000.00135000.00270000.00405000.00810000.00
18LaptopsMinneapolisUSD600000.00135000.00270000.00405000.00810000.00
Sheet2
Cell Formulas
RangeFormula
B2:B4B2=SUMIF($A$7:$A$18,A2,$D$7:$D$18)
D7:D18D7=H7/VALUE(LEFT(VLOOKUP(C7,$I$1:$J$3,2,FALSE),4))
H7:H18H7=SUM(E7:G7)
 
Upvote 0
Thank you very much for your time and help.

I may not have the possibility for adding further columns. There would be a YTD column, a current year estimate column and next year outlook column. Which are currently hidden.

So I would need the formula to look this up on the summary section b2:B4 above.

Is there anyway that could be done? Thank you
 
Upvote 0
Hi I tried to do it without helper column, but strangly it works on 365 but not in Excel 2013.

@Fluff Please do you have any idea why is that?

SUMPRODUCT - Copy (2).xlsx
ABCDEFGHIJK
1SummarySGD EquivalentWith 365With Excel 2013USD1.35
2Machinery30000003284444.444GBP1.67
3Laptops30000003000000CAD1
4Fixtures30000003115555.556
5Amount in Source (Local) Currency
6Asset TypeLocationCurrencyYTD SGD Equivalent23-Jan23-Feb23-MarYTD Total
7MachineryNew JerseyUSD135000270000405000810000
8MachineryMinneapolisUSD2700005400008100001620000
9FixturesLondonGBP1670003340005010001002000
10FixturesManchesterGBP33400066800010020002004000
11FixturesOttawaCAD2000004000006000001200000
12MachineryLondonGBP1670003340005010001002000
13MachineryLondonGBP1670003340005010001002000
14LaptopsMinneapolisUSD135000270000405000810000
15LaptopsMinneapolisUSD135000270000405000810000
16LaptopsMinneapolisUSD135000270000405000810000
17LaptopsMinneapolisUSD135000270000405000810000
18LaptopsMinneapolisUSD135000270000405000810000
19
20
Sheet10
Cell Formulas
RangeFormula
C2:C4C2=SUMPRODUCT($H$7:$H$18/VLOOKUP($C$7:$C$18,$I$1:$J$3,2,FALSE)*($A$7:$A$18=A2))
D2:D4D2=SUMPRODUCT($H$7:$H$18/VLOOKUP($C$7:$C$18,$I$1:$J$3,2,FALSE)*($A$7:$A$18=A2))
H7:H18H7=SUM(E7:G7)
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
CAD=Sheet10!$I$3:$J$3C2:D4
GBP=Sheet10!$I$2:$J$2C2:D4
USD=Sheet10!$I$1:$J$1C2:D4
 
Upvote 0
multiple posts solutions.xlsx
ABCDEFGHIJ
1SummarySGD EquivalentUSD1.35
2Machinery3000000.00GBP1.67
3Laptops3000000.00CAD1.00
4Fixtures3000000.00
5Amount in Source (Local) Currency
6Asset TypeLocationCurrencyJan-23Feb-23Mar-23YTD Total
7MachineryNew JerseyUSD135000.00270000.00405000.00810000.00
8MachineryMinneapolisUSD270000.00540000.00810000.001620000.00
9FixturesLondonGBP167000.00334000.00501000.001002000.00
10FixturesManchesterGBP334000.00668000.001002000.002004000.00
11FixturesOttawaCAD200000.00400000.00600000.001200000.00
12MachineryLondonGBP167000.00334000.00501000.001002000.00
13MachineryLondonGBP167000.00334000.00501000.001002000.00
14LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
15LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
16LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
17LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
18LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
sumifs conversion
Cell Formulas
RangeFormula
B2:B4B2=(SUMIFS($H$7:$H$18,$C$7:$C$18,$I$1,$A$7:$A$18,A2)/VALUE(LEFT(VLOOKUP($I$1,$I$1:$J$3,2,FALSE),4)))+(SUMIFS($H$7:$H$18,$C$7:$C$18,$I$2,$A$7:$A$18,A2)/VALUE(LEFT(VLOOKUP($I$2,$I$1:$J$3,2,FALSE),4)))+(SUMIFS($H$7:$H$18,$C$7:$C$18,$I$3,$A$7:$A$18,A2)/VALUE(LEFT(VLOOKUP($I$3,$I$1:$J$3,2,FALSE),4)))
H7:H18H7=SUM(E7:G7)
 
Upvote 0
Solution
Hi @ExceLoki

Do you have a specific reason putting VALUE and LEFT, just wanted to know

I just removed it and it works same.

Products.xlsx
ABCDEFGHIJK
1SummarySGD EquivalentUSD1.35
2Machinery3000000GBP1.67
3Laptops3000000CAD1
4Fixtures3000000
5Amount in Source (Local) Currency
6Asset TypeLocationCurrency23-Jan23-Feb23-MarYTD Total
7MachineryNew JerseyUSD135000270000405000810000
8MachineryMinneapolisUSD2700005400008100001620000
9FixturesLondonGBP1670003340005010001002000
10FixturesManchesterGBP33400066800010020002004000
11FixturesOttawaCAD2000004000006000001200000
12MachineryLondonGBP1670003340005010001002000
13MachineryLondonGBP1670003340005010001002000
14LaptopsMinneapolisUSD135000270000405000810000
15LaptopsMinneapolisUSD135000270000405000810000
16LaptopsMinneapolisUSD135000270000405000810000
17LaptopsMinneapolisUSD135000270000405000810000
18LaptopsMinneapolisUSD135000270000405000810000
19
Sheet11
Cell Formulas
RangeFormula
B2:B4B2=(SUMIFS($H$7:$H$18,$C$7:$C$18,$I$1,$A$7:$A$18,A2)/VLOOKUP($I$1,$I$1:$J$3,2,FALSE)+(SUMIFS($H$7:$H$18,$C$7:$C$18,$I$2,$A$7:$A$18,A2)/VLOOKUP($I$2,$I$1:$J$3,2,FALSE))+(SUMIFS($H$7:$H$18,$C$7:$C$18,$I$3,$A$7:$A$18,A2)/VLOOKUP($I$3,$I$1:$J$3,2,FALSE)))
H7:H18H7=SUM(E7:G7)
 
Upvote 0
i had left in there as i was trying another way to solve, it's not needed in the final solution... good catch
multiple posts solutions.xlsx
ABCDEFGHIJ
1SummaryMeUSD1.35
2Machinery3000000.00GBP1.67
3Laptops3000000.00CAD1.00
4Fixtures3000000.00
5Amount in Source (Local) Currency
6Asset TypeLocationCurrencyJan-23Feb-23Mar-23YTD Total
7MachineryNew JerseyUSD135000.00270000.00405000.00810000.00
8MachineryMinneapolisUSD270000.00540000.00810000.001620000.00
9FixturesLondonGBP167000.00334000.00501000.001002000.00
10FixturesManchesterGBP334000.00668000.001002000.002004000.00
11FixturesOttawaCAD200000.00400000.00600000.001200000.00
12MachineryLondonGBP167000.00334000.00501000.001002000.00
13MachineryLondonGBP167000.00334000.00501000.001002000.00
14LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
15LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
16LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
17LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
18LaptopsMinneapolisUSD135000.00270000.00405000.00810000.00
sumifs conversion
Cell Formulas
RangeFormula
B2:B4B2=SUMIFS($H$7:$H$18,$C$7:$C$18,$I$1,$A$7:$A$18,A2)/(VLOOKUP($I$1,$I$1:$J$3,2,FALSE))+(SUMIFS($H$7:$H$18,$C$7:$C$18,$I$2,$A$7:$A$18,A2)/(VLOOKUP($I$2,$I$1:$J$3,2,FALSE)))+(SUMIFS($H$7:$H$18,$C$7:$C$18,$I$3,$A$7:$A$18,A2)/(VLOOKUP($I$3,$I$1:$J$3,2,FALSE)))
H7:H18H7=SUM(E7:G7)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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