Thread: Auto fill cells
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Auto fill cells

Those interns must have sensed something was up and gotten out of there!!

Notice, this works on ColumnA; change to suit:
Sub FillIn()
Dim lastrow As Long
lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
Range("A2:A" & lastrow).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub

Also:
http://www.contextures.com/xlDataEntry02.html

BTW, don't have people do things like this. That's what Excel is for. If
you can describe the logic, you can code it.

Regards,
Ryan---

--
RyGuy


"Cheffred" wrote:

I am dumping a file from another program. In one of the columns, the account
#, only the first cell in each group is filled in. Is there a way to
automatically go through and fill the other cells in each group with the
account number? I could manualy copy and paste each group, but the report is
12,000 lines. I don't have that much time and my interns have left for the
day.

I appreciate the help