I wish to create two user defined functions to add columns based on value in another cell
For Col G : addpm(A1)
For Col J : addsl(A1)
When A1 =1
G12=0
J12=N12
When A1 =2
G12=N12
J12=N12+O12
When A1 =2
G12= N12+O12
J12=N12+O12+P12
When A1 =3
G12= N12+O12+P12
J12=N12+O12+P12+Q12
and so on...
Note: The value in A1 will go up to 20. I know how to use the nested IF but I wish to get an easier solution.
Kindly help with the user defined functions addpm() & addsl() in Macros
Bookmarks