+ Reply to Thread
Results 1 to 3 of 3

help with syntax

Hybrid View

Guest help with syntax 02-04-2006, 09:40 PM
Guest RE: help with syntax 02-04-2006, 09:50 PM
Guest Re: help with syntax 02-04-2006, 10:10 PM
  1. #1
    anny
    Guest

    help with syntax

    hi

    This code gives an error (Application-defined or Object-defined error).

    Worksheets("PrintRpts").Range("O8").Formula = "=IF(E8<>"",E8,-1)"

    But, when I type =IF(E8<>"",E8,-1) directly into O8, I get the
    expected result. Any ideas where the problem is?

    Thanks a bunch
    anny



  2. #2
    JMB
    Guest

    RE: help with syntax

    You need another pair of quotes.

    Worksheets("PrintRpts").Range("O8").Formula = "=IF(E8<>"""",E8,-1)"


    "anny" wrote:

    > hi
    >
    > This code gives an error (Application-defined or Object-defined error).
    >
    > Worksheets("PrintRpts").Range("O8").Formula = "=IF(E8<>"",E8,-1)"
    >
    > But, when I type =IF(E8<>"",E8,-1) directly into O8, I get the
    > expected result. Any ideas where the problem is?
    >
    > Thanks a bunch
    > anny
    >
    >
    >


  3. #3
    anny
    Guest

    Re: help with syntax

    Works beautyfully!
    anny



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1