Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Here is my code. I would like to know since every file has a different amount of records, if there is a way process my code only to the last active record? In this case here I put 6500 records but I really do have that many records. And my record must start with the second record for processing. Range("V2").Select ActiveCell.FormulaR1C1 = "=CONCATENATE(C[-2],"" "",C[-10],"" "",C[-16])" Selection.AutoFill Destination:=Range("V2:V*6500*"), Type:=xlFillDefault Range("V2:V65000").Select Selection.Copy Range("F2").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Columns("T:Z").Select Selection.ClearContents -- jcc31 ------------------------------------------------------------------------ jcc31's Profile: http://www.excelforum.com/member.php...o&userid=24692 View this thread: http://www.excelforum.com/showthread...hreadid=490965 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Try this: Dim cell As Range Dim lastCell As Range Dim theCells As Range Set lastCell = Cells(6500, ActiveCell.Column).End(xlUp) 'find the last active cell, change 6500 up or down to ensure coverage Set theCells = Range(Cells(*X*, *ActiveCell.Column*), lastCell) 'X is the value of starting row, ie *2* and ActiveCell.Column can be a defined value, i.e *"V"* For Each cell In theCells If Not IsEmpty(cell) Then 'your code to do whatever End If Next HTH -- AH·C ------------------------------------------------------------------------ AH·C's Profile: http://www.excelforum.com/member.php...o&userid=29108 View this thread: http://www.excelforum.com/showthread...hreadid=490965 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Row select mode to highlight active row of active cell | Excel Discussion (Misc queries) | |||
Select Active Cells | Excel Worksheet Functions | |||
How to select the active sheet? | Excel Worksheet Functions | |||
Select Row of Active Cell | Excel Programming | |||
how do I select cells in column A thru F in the active row? | Excel Programming |