Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 383
Default help with EXCEL SCRIPT

hi, trying to get help on automating copy-paste of data columns. have 4
items to move:
if possible would like double guard: Cell: $DN$6="z", if use of button
to activate/initiate has a pop-up: "Are you Sure": Y/N
if possible: (automatic) adjust of column / cell: $DN$6 locations in
script .. ??, if other items are moved.

specifics on column letters, for (4) moves:
1 col: DU to DT
22 col (main, 21 col back up), COPY: EE - EY,
Paste-Special-Values to right 1 col: EF - EZ
double columns (10 sets of 2), COPY: FE - FV, Paste-Special-Values
to right 2 cols: FG - FX
double columns (1 set of 2), COPY: EC - ED, Paste-Special-Values
to: FE - FF

the following is a copy of the script currently in use. thanks.



Option Explicit
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Target.Row < 130 Then Exit Sub
'add "+" to blank spaces col A:
If Me.Cells(.Row, "A").Value = "." Then Exit Sub
If Not Intersect(Me.Range("a:a"), .Cells) Is Nothing Then
Application.EnableEvents = False
.Value = Replace(.Value, " ", "+")
Application.EnableEvents = True
End If
'make column changes:
If Not Intersect(Me.Range("CK:CO"), .Cells) Is Nothing Then
Application.EnableEvents = False
'Destination:
With Me.Cells(.Row, "CF")
.NumberFormat = "dd"
.Value = Now
End With
Application.EnableEvents = True
End If
'make column changes:
If Not Intersect(Me.Range("CW:CW"), .Cells) Is Nothing Then
Application.EnableEvents = False
'Destination
With Me.Cells(.Row, "CG")
.NumberFormat = "dd"
.Value = Now
End With
Application.EnableEvents = True
End If
End With
End Sub


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
Excel Script to Auto pick next Jay Bowers Excel Worksheet Functions 1 July 27th 08 11:10 PM
VB Script in Excel to copy a row traceydee150 Excel Worksheet Functions 4 June 21st 06 05:19 PM
getting data from excel worksheet in to a script nuti Excel Discussion (Misc queries) 0 January 12th 06 08:48 AM
Excel Graph script the G Charts and Charting in Excel 1 October 11th 05 12:15 PM
How do I get the trendline equation from Excel to script? Mattias Charts and Charting in Excel 1 December 7th 04 12:21 PM


All times are GMT +1. The time now is 09:46 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"