Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel 97
kerri
Sub Auto_Fill() Dim Lrow As Long With ActiveSheet Range("C1").Formula = "=A1&B1" Lrow = Range("A" & Rows.Count).End(xlUp).Row Range("C1:C" & Lrow).FillDown End With End Sub Gord Dibben Excel MVP On Fri, 9 Jan 2004 07:53:41 -0800, "kerri" wrote: Can anyone help me with an excel question? I want to combine 2 fields (ex: row 1, column a and b) but would also like to combine more than 1 row at a time. Any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel 97
Not to sound dumb or anything, but where do I put this info
----- Gord Dibben wrote: ---- kerr Sub Auto_Fill( Dim Lrow As Lon With ActiveShee Range("C1").Formula = "=A1&B1 Lrow = Range("A" & Rows.Count).End(xlUp).Ro Range("C1:C" & Lrow).FillDow End Wit End Su Gord Dibben Excel MV On Fri, 9 Jan 2004 07:53:41 -0800, "kerri" wrote Can anyone help me with an excel question? I want to combine 2 fields (ex: row 1, column a and b) but would also like to combine more than 1 row at a time. Any ideas |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel 97
Sorry kerri.
You posted in the programming group so thought you were looking for a programming method. A manual method would be to enter in C1 =A1&B1 then drag/copy this down column C as far as you wish. Or double-click on the fill handle(bottom right corner) or C1. OR if you want to use the Auto_Fill macro....... Make a backup copy of your workbook before taking further steps. Hit ALT + F11 to enter the Visual Basic Editor. ViewProject Explorer(if not there already). Select your workbook/project and InsertModule. Paste the Sub Auto_Fill in there. ALT + Q to get back to Excel. Save the workbook. ToolsMacroMacros. Select the Auto_Fill macro and "Run" For more on getting started with macros see David McRitchie's site http://www.mvps.org/dmcritchie/excel/getstarted.htm Gord On Fri, 09 Jan 2004 11:54:01 -0800, Gord Dibben wrote: kerri Sub Auto_Fill() Dim Lrow As Long With ActiveSheet Range("C1").Formula = "=A1&B1" Lrow = Range("A" & Rows.Count).End(xlUp).Row Range("C1:C" & Lrow).FillDown End With End Sub Gord Dibben Excel MVP On Fri, 9 Jan 2004 07:53:41 -0800, "kerri" wrote: Can anyone help me with an excel question? I want to combine 2 fields (ex: row 1, column a and b) but would also like to combine more than 1 row at a time. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|