Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Insert colmn

how can I automatically insert column before "Column name Top" across
multiple sheet. Also date each column for current month E.g) 1 - Sep -08

all help totally appreciated. thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,805
Default Insert colmn

Do you want to insert a column before the Column containing "Top" in Row 1,
on ALL sheets and enter 1-Oct-08 in Row 1 for the new column, Oct-08 being
the current month?

"Yossy" wrote:

how can I automatically insert column before "Column name Top" across
multiple sheet. Also date each column for current month E.g) 1 - Sep -08

all help totally appreciated. thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,805
Default Insert colmn

Try
Sub insertCol()
Dim dt As String
dt = Application.WorksheetFunction.Text(Date, "dd-mmm-yyyy")
dt = "01" & Right(dt, Len(dt) - 2)
For Each ws In Worksheets
ws.Activate
Range("1:1").Select
For Each c In Selection
If c.Value = "Top" Then
c.Select
Selection.EntireColumn.Insert
ActiveCell.Value = dt
Exit For
End If
Next
Next
End Sub

"Sheeloo" wrote:

Do you want to insert a column before the Column containing "Top" in Row 1,
on ALL sheets and enter 1-Oct-08 in Row 1 for the new column, Oct-08 being
the current month?

"Yossy" wrote:

how can I automatically insert column before "Column name Top" across
multiple sheet. Also date each column for current month E.g) 1 - Sep -08

all help totally appreciated. thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A shortcut to set colmn to count (example: A2=A1+A)? saraburningtorch Excel Programming 1 June 14th 07 02:14 AM
How can we get more columns on a spreadsheet, like 365 days/colmn Edgentrib Excel Worksheet Functions 2 September 5th 05 10:36 PM
return colmn number + index medicenpringles[_11_] Excel Programming 2 June 26th 05 08:34 PM
HELP: need to find number and sum another colmn moshe[_3_] Excel Programming 2 July 25th 04 11:34 AM
Protect except chng colmn width Todd F Excel Programming 0 April 2nd 04 03:04 PM


All times are GMT +1. The time now is 07:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"