Vba Code

H

Horacio

Hi!
I´locking for a vba code that fill in a column different names.
Column A
1Today
2
3
4 Tomorrow
5
6
7
8

So what I wont is a code that fill TODAY till the row 3 and then
TOMORROW to the row 8

Thank you
Horacio
 
S

Simon Lloyd

Horacio, are the figures in column 1 and the names in column 2 or ar
there no figures

If there aren't how will the code know enough cells have been filled i
with each name

what would be the marker for it

Horacio;524875 said:
Hi
I´locking for a vba code that fill in a column different names
Column
1Toda


4 Tomorro





So what I wont is a code that fill TODAY till the row 3 and the
TOMORROW to the row

Thank yo
Horaci

--
Simon Lloy

Regards
Simon Lloy
'Microsoft Office Help' (http://www.thecodecage.com
 
R

Rick Rothstein

Give this macro a try...

Sub FillInTheBlanks()
Dim Blanks As Range, LastRow As Long
LastRow = ActiveSheet.Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row
For Each Blanks In Range("A1:A" & LastRow).SpecialCells(xlCellTypeBlanks)
Blanks.Value = Blanks(1).Offset(-1).Value
Next
End Sub
 
A

Atishoo

are you just wanting to fill down the cells with the contents of the cell
above?

For Each c In Worksheets("sheet1").Range("A2:A100")
If c.Value = "" Then c.Value = c.Offset(-1, 0)
Next

The question is at what point do you stop?
this only continues until A100
 

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