Thread: coping cells
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default coping cells

You can do it pretty easily by hand... Assuming Code 1 is in Cell A1 add this
formula to A2 =if(b2<"", A1, ""). Now copy Cell A2. Highlight A1:A100 (or
however far you need to go) and hit F5 -Special Cells - Blanks - OK (all
of the blanks in A1:A100 will now be selected) Paste the formula into the
blanks... Now Copy column A and paste speacial values. if you need a macro to
do this just record your actions while you do it...
--
HTH...

Jim Thomlinson


"JJMNZ76" wrote:

Saludos...

What would the code in vba be for the following , Kind of new vba and stil
haven't got the hang of loops.

I have a sheet the looks like the following. How can I make it so it copies
CODE1 in the blank cells till it reaches code2 , then copy code 2 in the
blank cells between code2 and 3 and so on.

a b c
Code 1 Juan 22 days
Pedro 14 hrs
Luis 15 day

Code 2 Juan 5 days
Pedro 3 hrs
Luis 2 day

Code 3 Juan 2 days

and so on.