1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Urgent - help Using an Excel formula in VBA

Discussion in 'Visual Basic ( VB )' started by nicoPK, Dec 23, 2010.

  1. nicoPK

    nicoPK New Member

    Joined:
    Dec 23, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    The formula is: =IF(Input!R703<0,HPLNK(Input!R703,Entity,Category6 ,$A$677&"."&$A703,N$3,Frequency1,Application1),HPL NK(Input!R703,Entity,Category6,"P1709"&"."&$A703,N $3,Frequency1,Application1))
    This works fine is excel so I know the syntax is ok with Excel

    When I try this in VB:
    Range("N679").Select
    Selection.Formula = "=IF(Input!R679<0,HPLNK(Input!R679,Entity,Category 6,$A$677&"."&$A679,N$3,Frequency1,Application1),HP LNK(Input!R679,Entity,Category6,"P1709"&"."&$A679, N$3,Frequency1,Application1))"

    I get a compile error with syntax

    Can you help?
     

Share This Page