View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default input conditional formulas using VBA Macro in axcel sheet

Hi Francesco:

Worksheets("ouput").Range("B17").FormulaLocal =
"=SE(O_(B17="""";D17="""";D17=0);"""";CERCA.VERT(B 17;input!$A$3:$B$1000;2;FALSO)*D17)"
or
Worksheets("ouput").Range("B17").Formula = "=IF(O_(B17="""";D17="""";D17=0);"""";VLOOKUP(B17; input!$A$3:$B$1000;2;FALSE)*D17)"

Note the double quotes between quotes

--
Kind regards,

Niek Otten



"Francesco" wrote in message ...
Rangeusing WindowsXP professional and excel 2003 (excel is in Italian) as I
am writing from Rome Italy and I need some help:

What I need is to in put a formula (if,true, false) in the cells of my excel.
the the macro I have used is:
Worksheets("output").Range("B17")="=SE(O_(B17="";D 17="";D17=0);"";CERCA.VERT(B17;input!$A$3:$B$1000; 2;FALSO)*D17)"

I get an error (runtime 1004) I do not know if it due to the fact that VBA
macro doesn't recognice the instruction in italian in the formula )
Traslation:( SE= IF, CERCA.VERT= SEARCH Vertical)

I tried to use IF and VLOOKUP in place of the italian but got same error

Please can any one help me?

Thanks a lot

Francesco