Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using LibreOffice 3.6.4.3 on Ubuntu 12.10.

I use cell color and cell borders to group and distinguish groups of cells in my spreadsheet.

I have bold horizontal borders every 4 rows. This is a pain to do because you can't specify "embolden the borders on every nth row". So I do it manually, for enough of the spreadsheet as I need to deal with.

I'm developing the spreadsheet, so the I modify the formulae frequently. When I get the formula working for a cell, I propagate that formula to a bunch of rows below by dragging the cell's fill handle down to the other (several hundred) rows. The problem is that dragging the fill handle copies the cell formatting from the source cell(s) as well as the formula(e). This undoes the emboldened borders on every 4th row and re-colors all the cells too. I then have to select a group of 4 rows of cells and manually embolden the top and bottom borders for each group of 4 rows. It's very tedious.

Is there a way to drag the fill handle and propagate the formula(e) but not the cell formatting?

share|improve this question
  • Copy your new formula
  • Select every cell where the new formula needs to be
  • Right click, and in the popup menu, select "Paste Only >> Formula"

This preserves your cells' color, border, etc.

share|improve this answer

You can do this using conditional formatting.

First, define a new cell style for your underlined cells, e.g., Underlined. Then pick a cell and define a conditional format (Format->Conditional Formatting). For Condition 1, pick Formula is, and in the formula box enter "(ROW()/4=INT(ROW()/4))" (without the quotes). Choose the cell style to be Underlined. This is true only every 4th row.

Copy the cell (Ctrl+C), select the area you want to modify and Paste Special (Ctrl+Shift+V). Clear all the check boxes in the selection section except the Formats box and complete the copy. Or even easier, use the format painter.

You should now be able to click and drag a formula through those boxes without affecting your underline formatting.

share|improve this answer
    
Pretty good, but it wipes out the color in the box where (ROW()/4=INT(ROW()/4)). – Chelmite Feb 2 '13 at 1:10
    
I'm not sure I follow. If the font color and background color are set in the cell style, then they are maintained. – W_Whalley Feb 2 '13 at 14:54
    
Your conditional formula can be simplified a little, to MOD(ROW(),4)=0. – Scott Oct 25 '15 at 23:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.