background
i have a spreadsheet that has some advanced formulas.. for example i'm putting together the budget for the month and i have different employees who have different pay structures (ie some hourly, some hourly with bonus based on estimation target etc)..
I like to put a single formula and then copy and paste it across cells.. so this is what I have now
=if(C54="employee 1",D54*'resource information'!$D$3,
if(C54="employee 2",D54*'resource information'!$D$8,
if(C54="employee 3",D54*'resource information'!$D$4)))
which makes a basic multiplication of hours*hourly salary of each employee (employees 1/2/3 having different salaries)
problem
what if i would like to add an employee 4 who has a complex formula to extract their pay (ie with 3-4 different variables and extracted from different sheets?) i don't want to add that ugly formula to the above.. rather i would like to refer a cell that has that formula at the above.. something like this
=if(C54="employee 1",D54*'resource information'!$D$3,
if(C54="employee 2",D54*'resource information'!$D$8,
if(C54="employee 3",D54*'resource information'!$D$4)))
+ employee 4 formula with parameters C54,D54 <-- this formula will be stored elsewhere
any idea?