Macro for copying cells above empty cells

J

JRB1024

I'm having trouble makin a macro for the following:
In column A I have varying entries of numbers or blank cells. If the
cell is blank I need it to go to the nearest cell above it and copy
that number. For example

A1=443
A2=
A3=
A4=558
A5=


I would need A2 and A3 to be filled with 443 and A5 to be filled with
558. please help!
 
B

Bob Phillips

See previous post

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

you can do this without a macro

Select the range
hit CTRL+G (Goto)
Select 'Special'
In specil window select 'Blanks'
now click on OK
Now only blank cells are selected
hit CTRL+D, this will copy the details from top cell to below blank cells only
then you can do a copy-paste special values on a safer side.
 
J

JRB1024

See previous post

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)






- Show quoted text -

When I hit ctr-D it does nothing.
 

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