Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE2 R1C1 Reference

Status
Not open for further replies.

krindler

Programmer
Jul 16, 2002
39
US
Hello...

I am using an R1C1 reference to determine the Totals of a few rows. However, if the total of the R1C1 reference comes to 0, I would like to display a Null value instead of the 0. Is this possible? My current statement is below...

args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG ( args, v_row_count );
OLE2.ADD_ARG ( args, v_column_count);
cell := OLE2.GET_OBJ_PROPERTY ( worksheet, 'Cells', args );
OLE2.DESTROY_ARGLIST ( args );
OLE2.SET_PROPERTY ( cell, 'FormulaR1C1', '=SUM(R[-7]C:R[-1]C)' );

Any help anyone could offer is much appreciated!!

Thanks In Advance!!
 
Try changing your
=SUM... line to
=IF(SUM(R[-7]C:R[-1]C),0,"")
 
Thanks so much for your help...The statement I ended up using was:

=IF(SUM(R[-7]C:R[-1]C), SUM(R[-7]C:R[-1]C), "")

Everything seems to be working the way it should now!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top