ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   excel 97 (https://www.excelbanter.com/excel-programming/287391-re-excel-97-a.html)

Gord Dibben

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?



kerri[_2_]

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




Gord Dibben

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?




All times are GMT +1. The time now is 12:23 PM.

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