Thread: Vba Code
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Vba Code

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

--
Rick (MVP - Excel)


"Horacio" wrote in message
...
Hi Simon
I attach a image of the sheet.
Thank you
Horacio

Simon Lloyd escreveu:
Horacio, are the figures in column 1 and the names in column 2 or are
there no figures?

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

what would be the marker for it?

Horacio;524875 Wrote:
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