Forum Discussion
Choosing hourly rate tables in Excel to calculate fee budgets
- Dec 11, 2023
=IF(C2=1,B2*VLOOKUP(B2,$F$3:$G$10,2,FALSE),B2*VLOOKUP(B2,$I$3:$J$10,2,FALSE))
This formula could return the intended result in the sample sheet.
=IF(C2=1,B2*VLOOKUP(B2,$F$3:$G$10,2,FALSE),B2*VLOOKUP(B2,$I$3:$J$10,2,FALSE))
This formula could return the intended result in the sample sheet.
- prcrispxl185Dec 11, 2023Copper ContributorAmazing, thats really helpful.
I've updated it so that it is the below, so E3 is which rate table to use, so in this example, with E3 showing that you refer to rate table 1, the fees are worked out below.
=IF(E3=1,(F3*H14)+(G3*H15))
However, if there are 2 rate tables, so you can choose 1 or 2 - i can't seem to work out how you have a second option - i thought it would be the below, but that doesn't seem to work (comes up with #value error
=IF(E3=1,(F3*H14)+(G3*H15)),IF(E3=2,(F3*H18)+(G3*H19))- OliverScheurichDec 11, 2023Gold Contributor
=IF(E3=1,(F3*H14)+(G3*H15),IF(E3=2,(F3*H18)+(G3*H19)))
This works in my sheet. I've made a small change with one closing bracket.
- prcrispxl185Dec 11, 2023Copper Contributorfabulous, thanks!
What a fab community!
- Michael_Morris620Dec 11, 2023Copper Contributor
delete the IF(E3=2, in the second half.
the IF is dictating that if E3 =1 then do a certain thing, but if E3 is any other value at all then do the other thing.
hence no need to state the IF as a second value as since E3 didn’t equal 1 then the other thing happens.
if you had three or more choices then either nested IF, or IFS, or the SWITCH or CHOOSE functions could be used, but the current choice of a one or a two doesn’t need those.
Mike