Forum Discussion
MrGTH
Jun 06, 2021Copper Contributor
Calculate percent of total with two criteria in one operation
I'm having trouble thinking of a way to solve this in one single operation. The exact statement is "calculate the percentual part of Agent 1 and Agent 3" compared to the amount of surveys". I can thin...
- Jun 06, 2021
All three formulas should produce the same result. With the data from your photo, I get this:
The formula VLOOKUP("Agent 1",A28:B32,2,FALSE) does the following:
It looks for the value "Agent 1" in the first column of the range A28:B32, i.e. in A28:A32.
If found, it returns the corresponding value from the 2nd column of A28:B32, i.e. from B28:B32.
The last argument FALSE tells Excel to look for an exact match.
HansVogelaar
Jun 06, 2021MVP
You omitted the comma between A28:A32 and "Agent 1", and also between A28:A32 and "Agent 3".
MrGTH
Jun 06, 2021Copper Contributor
Thank you so much. That was the mistake indeed. I tried it now and it gave me the correct result!