我正在尝试对每个国家/地区的销售额进行汇总(简单),但同时还要转换我使用的各种货币。我认为这最好通过嵌套的if函数来完成,但是我不知道该怎么写。
我希望该公式可以将每个国家/地区的销售总额相加,并根据参考汇率将货币编辑为GBP
任何帮助,不胜感激!
答案 0 :(得分:1)
使用以下公式:
Ignoring exception in command search:
Traceback (most recent call last):
File "C:\Users\Даниил\PycharmProjects\discordbot\venv\lib\site-packages\discord\ext\commands\bot.py", line 886, in invoke
yield from ctx.command.invoke(ctx)
File "C:\Users\Даниил\PycharmProjects\discordbot\venv\lib\site-packages\discord\ext\commands\core.py", line 491, in invoke
yield from self.prepare(ctx)
File "C:\Users\Даниил\PycharmProjects\discordbot\venv\lib\site-packages\discord\ext\commands\core.py", line 455, in prepare
yield from self._parse_arguments(ctx)
File "C:\Users\Даниил\PycharmProjects\discordbot\venv\lib\site-packages\discord\ext\commands\core.py", line 369, in _parse_arguments
transformed = yield from self.transform(ctx, param)
File "C:\Users\Даниил\PycharmProjects\discordbot\venv\lib\site-packages\discord\ext\commands\core.py", line 249, in transform
raise MissingRequiredArgument(param)
discord.ext.commands.errors.MissingRequiredArgument: message is a required argument that is missing.
答案 1 :(得分:0)
如果您尝试汇总每个国家/地区的销售额并同时转换货币(基于GBP),请使用
=SUMIF(B3:B15,B18,D3:D15) * VLOOKUP(VLOOKUP(B18,B3:D15,2,FALSE),F3:G5,2,FALSE)
并向下拖动公式
答案 2 :(得分:0)
我将使用此公式转换E列中的销售额:
=IF(C3 = "EUR", D3 * $G$4, IF(C3 = "USD", D3 * $G$4,)) ..drag this down
然后我将使用SUMIF公式
=SUMIF($B$3:$B$13, B16, $E$3:$E$13) ..drag this down
答案 3 :(得分:0)
将两个范围都转换为Excel表,执行VLOOKUP或INDEX / MATCH将汇率传递到左侧的表中,添加另一列进行货币交换,然后从该表中制作数据透视表,然后将在您要总结并报告的字段中。查看有关如何制作表格和数据透视表的答案:VBA to copy data if multiple criteria are met