Macro
Roger
this cannot work for since it has to 2 formulas if a= x then 1st formula
should run and if a=y then 2nd formula should run.
--
Nisha P
"Roger Govier" wrote:
Hi
There is no need for a macro to achieve what you want.
just include another IF clause, testing against your selection of X.
I used Cell A1 to either hold X or not
=IF(A1="X",
IF(D12461500,25,
IF(D12461000,20,
IF(D1246500,15,10))),
IF(D1247300,15,
IF(D1247100,12,10)))
-(J1246+K1246)
I have split the formula on each IF so you can read it more clearly, and to
prevent the newsreader from breaking it in strange places. It is all one
long formula really.
Note that I have removed the " " around your values. As you had the
formula, it would place text values in the cell, which when you try to
deduct (J1246+K1246) at the end, would produce a #VALUE result.
Format the cell as Currency $ if you wish it to show as Dollar amounts
--
Regards
Roger Govier
"nishkrish" wrote in message
...
Hi i need to write a macro and have no idea how to do it if some one can
show
me form scratch
Ihave different formalus in different column which calculate commission
for
agent
Eg : if(d1247300,"$15",if(d1247100,"$12","$10"))-(j1247+k1247)
=IF(D12461500,"$25",IF(D12461000,"$20",IF(D1246 500,"$15","10")))-(J1246+K1246)
this 2 different formula in same column
i want to write a macro so i dont have to use two different formula when i
say certain column is X then its should run 1st formula if i select "y" it
should run 2nd formula.
Any help is appreciated.
--
Nisha P
|