#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Vba Code

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vba Code


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



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=144023

  #3   Report Post  
Posted to microsoft.public.excel.programming
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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Vba Code

Thank you works perfect
Horacio

Rick Rothstein escreveu:
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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default Vba Code

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

"Simon Lloyd" wrote:


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



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=144023


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
How can I modify my code to offset the defined range and repeat theprocedure instead of duplicating my code? [email protected] Excel Programming 4 May 29th 09 10:13 PM
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does ker_01 Excel Programming 6 October 3rd 08 09:45 PM
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Excel Programming 3 December 11th 06 05:14 AM
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... Corey Excel Programming 4 November 25th 06 04:57 AM


All times are GMT +1. The time now is 04:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"