Filling empty cell with value from the cell above

A

Alonso

After a copy-paste from a pivot table
i have a lot of empty cells
that i want to fill with the values from the cell above
to generate a new database

something like this:
Col A Col B Col C
X 1 1
2
2 1
Y 3 2
3

turned into this:
Col A Col B Col C
X 1 1
X 1 2
X 2 1
Y 3 2
Y 3 3


maybe a macro??
 
T

Tom Hutchins

No macro needed. Select the whole range of cells making up your table. Press
F5, then click Special >> Blanks >> OK. Now all the blank cells within your
table are selected. Press the equal sign (=), then the up arrow. Hold down
the Ctrl key and press Enter. This puts a formula in every blank cell,
pulling the value from the cell above it. Finally, copy & paste the whole
table in place as values.

Hope this helps,

Hutch
 
A

Alonso

it worked!!
great!!

thanks

Tom Hutchins said:
No macro needed. Select the whole range of cells making up your table. Press
F5, then click Special >> Blanks >> OK. Now all the blank cells within your
table are selected. Press the equal sign (=), then the up arrow. Hold down
the Ctrl key and press Enter. This puts a formula in every blank cell,
pulling the value from the cell above it. Finally, copy & paste the whole
table in place as values.

Hope this helps,

Hutch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top