go to tools-macro-visual basic editor
type in the editor
sub test()
Dim RowValue
Dim ColumnValue
Dim ColLetter
RowValue = Worksheets("Agents").Range("A65536").End
(xlUp).Row
ColumnValue = Worksheets("Agents").Range("B:B").End
(xlToRight).Column
Worksheets("Agents").Range("A1").Offset(0, ColumnValue -
1).Select
'Converts column number to column letter
ColLetter = Left(ActiveCell.Address(, 0), InStr
(ActiveCell.Address(, 0), "$") - 1)
Worksheets("Agents").Range("A2:" & ColLetter &
RowValue).Select
Selection.Copy
end sub
and to execute it go to tools-macro-macros, you will see tes
procedure listed there to run
--
anilsolipura
-----------------------------------------------------------------------
anilsolipuram's Profile:
http://www.excelforum.com/member.php...fo&userid=1627
View this thread:
http://www.excelforum.com/showthread.php?threadid=27831