Russell King <rjkfsm <at> bluebottle.com> writes: .... What I need is a function for my macro that will go > through the top of the sheet, leaving the header row alone, and delete > the rows that have a value (not content) of zero. ... > rk > I composed this before the master (Andrew P.) posted. No liability accepted. It may need altering. It may help. Regards. Do
oRange1 = oSheet.getCellRangeByPosition _ ( 0, 4, 255, 4 ) 'this gets A5 to IV5 lVolume = oRange1.computeFunction _ ( com.sun.star.sheet.GeneralFunction.SUM ) ' this gets the total 'of values in the range If lVolume = 0 Then oSheet.Rows.RemoveByIndex( 4, 1 ) 'removes row 5 End If Loop until lVolume > 0 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]