+ Reply to Thread
Results 1 to 4 of 4

SumIf in ActiveCell.FormulaR1C1 ?

  1. #1
    RitaP
    Guest

    SumIf in ActiveCell.FormulaR1C1 ?

    I want to change this
    ActiveCell.FormulaR1C1 = "=SUM(R[-8]C:R[-1]C)"

    so that if the value summed would equal 0 that the the cell is left blank.

    Would appreciate if anyone could post the correct formula for this. Thanks.

  2. #2
    Marcelo
    Guest

    RE: SumIf in ActiveCell.FormulaR1C1 ?

    Try this

    hth
    regards from Brazil


    ActiveCell.FormulaR1C1 = "=IF(SUM(R[-8]C:R[-1]C)=0,"",SUM(R[-8]C:R[-1]C)"

    "RitaP" escreveu:

    > I want to change this
    > ActiveCell.FormulaR1C1 = "=IF(SUM(R[-8]C:R[-1]C)=0,0,SUM(R[-8]C:R[-1]C)"
    >
    > so that if the value summed would equal 0 that the the cell is left blank.
    >
    > Would appreciate if anyone could post the correct formula for this. Thanks.


  3. #3
    RitaP
    Guest

    RE: SumIf in ActiveCell.FormulaR1C1 ?

    I pasted in your formula but I'm getting error 1004 application-defined or
    object-defined error.

    Rita

    "Marcelo" wrote:

    > Try this
    >
    > hth
    > regards from Brazil
    >
    >
    > ActiveCell.FormulaR1C1 = "=IF(SUM(R[-8]C:R[-1]C)=0,"",SUM(R[-8]C:R[-1]C)"
    >
    > "RitaP" escreveu:
    >
    > > I want to change this
    > > ActiveCell.FormulaR1C1 = "=IF(SUM(R[-8]C:R[-1]C)=0,0,SUM(R[-8]C:R[-1]C)"
    > >
    > > so that if the value summed would equal 0 that the the cell is left blank.
    > >
    > > Would appreciate if anyone could post the correct formula for this. Thanks.


  4. #4
    RitaP
    Guest

    RE: SumIf in ActiveCell.FormulaR1C1 ?

    I got it working, just needed to add a couple more quotes to your formula
    Marcelo. My thanks to you for pointing me in right direction.

    Formula that worked:
    ActiveCell.FormulaR1C1 = "=IF(SUM(R[-8]C:R[-1]C)=0,"""",SUM(R[-8]C:R[-1]C))"


    "Marcelo" wrote:

    > Try this
    >
    > hth
    > regards from Brazil
    >
    >
    > ActiveCell.FormulaR1C1 = "=IF(SUM(R[-8]C:R[-1]C)=0,"",SUM(R[-8]C:R[-1]C)"
    >
    > "RitaP" escreveu:
    >
    > > I want to change this
    > > ActiveCell.FormulaR1C1 = "=IF(SUM(R[-8]C:R[-1]C)=0,0,SUM(R[-8]C:R[-1]C)"
    > >
    > > so that if the value summed would equal 0 that the the cell is left blank.
    > >
    > > Would appreciate if anyone could post the correct formula for this. Thanks.


+ 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