At 20:26 10/02/2013 -0500, Jason Cipriani wrote:
I'd like to be able to go down a column, and fill every blank cell with the same content as the first non-blank cell above it. So if I have:

5
*blank*
*blank*
*blank*
6
7
8
*blank*
9
*blank*
10
*blank*

I want to be able to select those cells in that column and have it changed to:

5
5
5
5
6
7
8
8
9
9
10
10

Is it possible to write a macro to do this (or is there maybe something already built in)?

You realise that you can do this manually very easily?

We'll have to assume that your top cell is always occupied; I'll also assume that "*blank*" means empty. Suppose that your values are in column A. In B1, enter =A1. In B2, enter =IF(A2="";B1;A2) . Fill just B2 down the column. Now you have a few choices: you can use column B for further calculation in place of column A, possibly hiding either column A or column B, or you can copy the values in B back over A (using Paste Special... to freeze the values), possibly then deleting either column B or its contents.

I trust this helps.

Brian Barker


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org

Reply via email to