Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

macro to copy down the values while the adjacent cell be NOT empty

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hernan - 08 Apr 2008 20:29 GMT
Hi, thank you for help me!
I have 2 columns and I need to copy down the value in the first-one
until the adjacent column be empty.
I can't define any range because the list will vary every time.
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
name1    1
?    2
?    3
?    4
?    5
.    6
.     7
.    8
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬

I was thinking in something like:
 i = 0
For Each cellA In rA
For Each cellB In rB
  i = i + 1
.Cells(i, 3) = cellA
.Cells(i, 4) = cellB
Gord Dibben - 08 Apr 2008 21:27 GMT
Sub Auto_Fill()
Dim Lrow As Long
   With ActiveSheet
       Lrow = Range("B" & Rows.Count).End(xlUp).Row
       Range("A1:A" & Lrow).FillDown
   End With
End Sub

Gord Dibben  MS Excel MVP

>Hi, thank you for help me!
>I have 2 columns and I need to copy down the value in the first-one
[quoted text clipped - 18 lines]
> .Cells(i, 3) = cellA
> .Cells(i, 4) = cellB
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.