LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default need a little help with some basic scripting

Hi:

This is my first post and I'm new to VB and excel scripting. (so any
advice is welcome).

OBJECTIVE:
To rearrange workbook data based on the value of a target cell. In a
4 spreadsheet workbook where sheets are labeled 'Master', 'Personal',
'Corporate' and 'Disconnect' it is desirable to copy data from the
master worksheet to the appropriate sheet based on the 'STATUS' value
(column 'F' or '6') from the master workbook. Target values are 'P",
'C' or 'D' cooresponding to the listing above.

METHOD:
To accomplish the above, the following code was inserted within the
Master worksheet, borrowing from many resources posted he

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Column = 6 Then
If Target.Value = "P" Then
Cells(Target.Row, 1).Resize(1, 29).Copy
Destination:=Worksheets("Personal").Cells(Rows.Cou nt, 1).End(xlUp)(2)
End If
If Target.Value = "C" Then
Cells(Target.Row, 1).Resize(1, 29).Copy
Destination:=Worksheets("Corporate").Cells(Rows.Co unt, 1).End(xlUp)(2)
End If
If Target.Value = "D" Then
Cells(Target.Row, 1).Resize(1, 29).Copy
Destination:=Worksheets("Disconnect").Cells(Rows.C ount, 1).End(xlUp)
(2)
End If

ActiveWorkbook.Save
End If


End Sub


RESULT:
Using this code results in active processing of the main worksheet as
values are entered in the sheet. While this is effective, there is no
method for adjusting the output sheets when the values change.

INQUIRY TO GROUP:
How can this code be modified to allow for the reprocessing of the
data (and perhaps re-writing of the output sheets) when target values
are over-written?

THANKS! Please email or post and suggestions or clarification
requests

Frank

 
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
VBA scripting Pete Excel Discussion (Misc queries) 2 January 9th 09 03:36 AM
Scripting Stefan Excel Discussion (Misc queries) 3 November 7th 08 10:54 AM
SCRIPTING APC25 Excel Programming 0 February 28th 06 07:31 PM
Is scripting the way to go here? LKG[_2_] Excel Programming 0 September 9th 05 07:22 PM
5.6 Scripting Jerry[_11_] Excel Programming 0 July 15th 03 11:55 PM


All times are GMT +1. The time now is 05:18 PM.

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

About Us

"It's about Microsoft Excel"