View Single Post
  #2  
Old January 5th, 2004, 09:59 PM
Jon Peltier
external usenet poster
 
Posts: n/a
Default FILL CELLS = VARIABLE # OF OTHER CELLS (WITH MACRO)

Manually: enter 70 in cell B1, then double click the little square at
the bottom right of the cell.

In code (assuming only column A has any values):

Sub FillNextToColA()
Dim rng As Range
Set rng = ActiveSheet.Cells(1, 1).CurrentRegion.Offset(0, 1)
rng.Value = 70
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______


wrote:

COL A has variable number of cells...
Want to fill equal number of COL B cells with the number
70...

EXAMPLE:
If COL A has 8 cells, want only 8 cells of COL B with 70.
I don't want CELL 9 thru CELL X to have any values.

NEED THE MACRO CODING PLEASE.