View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ryan H Ryan H is offline
external usenet poster
 
Posts: 489
Default copying sheet name

This should help.

Sub FindLastColumn()

Dim lngLastColumn As Long

lngLastColumn = ActiveSheet.Rows(1).Find(What:="", _
After:=Cells(1, 15), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=True, _
SearchFormat:=False).Column

Cells(1, lngLastColumn) = ActiveSheet.Name

End Sub

If this helps let me know. Click "YES" below.
--
Cheers,
Ryan


"oldjay" wrote:

I want to copy the sheet name to row 1 of the first blank column after col 15

Oldjay