ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto fill cells (https://www.excelbanter.com/excel-programming/425704-auto-fill-cells.html)

Cheffred

Auto fill cells
 
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

ryguy7272

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


Gord Dibben

Auto fill cells
 
You could do this without the use of VBA

Select the column with the blanks.

F5SpecialBlanksOK

Type an = sign in active blank cell.

Point or arrow to cell above.

Hit CTRL + ENTER.


Gord Dibben MS Excel MVP

On Tue, 17 Mar 2009 12:19:04 -0700, 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




All times are GMT +1. The time now is 08:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com