+ Reply to Thread
Results 1 to 4 of 4

Add formula in the code

  1. #1
    Annette
    Guest

    Add formula in the code

    How would I add this formula into the code on Sheet2?

    =SUMIF(Sheet1!B:B,"warrant",Sheet1!C:C)




  2. #2
    Tom Ogilvy
    Guest

    Re: Add formula in the code

    What does that mean - add it into the code on sheet2?

    If you wanted to use code to enter that formula in a cell you would do:

    Worksheets("Sheet2").Range("F6").Formula = _
    "=SUMIF(Sheet1!B:B,""warrant"",Sheet1!C:C)"

    --
    Regards,
    Tom Ogilvy


    "Annette" <[email protected]> wrote in message
    news:%[email protected]...
    > How would I add this formula into the code on Sheet2?
    >
    > =SUMIF(Sheet1!B:B,"warrant",Sheet1!C:C)
    >
    >
    >




  3. #3
    Annette
    Guest

    Re: Add formula in the code

    Very intuitive and just what I needed ... this makes sense and also helps me
    for the other formulas! Thanks!
    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > What does that mean - add it into the code on sheet2?
    >
    > If you wanted to use code to enter that formula in a cell you would do:
    >
    > Worksheets("Sheet2").Range("F6").Formula = _
    > "=SUMIF(Sheet1!B:B,""warrant"",Sheet1!C:C)"
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Annette" <[email protected]> wrote in message
    > news:%[email protected]...
    > > How would I add this formula into the code on Sheet2?
    > >
    > > =SUMIF(Sheet1!B:B,"warrant",Sheet1!C:C)
    > >
    > >
    > >

    >
    >




  4. #4
    Patrick Molloy
    Guest

    Re: Add formula in the code

    TIP
    To enter formula down a column:
    With Range("D7:D27")
    .FormulaR1C1 = "=somefunction(RC1)"
    End With


    "Annette" <[email protected]> wrote in message
    news:[email protected]...
    > Very intuitive and just what I needed ... this makes sense and also helps
    > me
    > for the other formulas! Thanks!
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:[email protected]...
    >> What does that mean - add it into the code on sheet2?
    >>
    >> If you wanted to use code to enter that formula in a cell you would do:
    >>
    >> Worksheets("Sheet2").Range("F6").Formula = _
    >> "=SUMIF(Sheet1!B:B,""warrant"",Sheet1!C:C)"
    >>
    >> --
    >> Regards,
    >> Tom Ogilvy
    >>
    >>
    >> "Annette" <[email protected]> wrote in message
    >> news:%[email protected]...
    >> > How would I add this formula into the code on Sheet2?
    >> >
    >> > =SUMIF(Sheet1!B:B,"warrant",Sheet1!C:C)
    >> >
    >> >
    >> >

    >>
    >>

    >
    >




+ 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