#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default macro adjust

I am running this macro in a spreadsheet which carries the numerical data
entered in sheet A to Sheet B with (PO) before each entry.
CURRENT MACRO RUNNING(WORKS PROPERLY)

Sub Worksheet_Change(ByVal Target As Range)
Dim zPO As String
Dim u as Integer
If Not Interest(Target, Range("A2:A9999)) Is Nothing Then On Error Resume Next
zPO = "PO" & Right(Target.Value, Len(Target.Value) - 3)
On Error GoTo 0
u = Sheets("Purchase Orders").Range("A65536").End(x1up).Row
Sheets("Purchase Orders").Range("A" & u + 1) = zPO
End If
End Sub

How can I edit this Macro to carry the same information to a third
location(column) in the workbook on a third sheet with VB (Vendor bills) as
the zVB vale.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default macro adjust

Try the below....(not tested)

Sub Worksheet_Change(ByVal Target As Range)
Dim zPO As String,zVB As String, u As Long
If Not Interest(Target, Range("A2:A9999)) Is Nothing Then
On Error Resume Next
zPO = "PO" & Right(Target.Value, Len(Target.Value) - 3)
zVB = "VB" & Right(Target.Value, Len(Target.Value) - 3)
On Error GoTo 0
u = Sheets("Purchase Orders").Range("A65536").End(x1up).Row
Sheets("Purchase Orders").Range("A" & u + 1) = zPO

u = Sheets("Vendor Bills").Range("A65536").End(x1up).Row
Sheets("Vendor Bills").Range("A" & u + 1) = zVB
End If
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Mylan" wrote:

I am running this macro in a spreadsheet which carries the numerical data
entered in sheet A to Sheet B with (PO) before each entry.
CURRENT MACRO RUNNING(WORKS PROPERLY)

Sub Worksheet_Change(ByVal Target As Range)
Dim zPO As String
Dim u as Integer
If Not Interest(Target, Range("A2:A9999)) Is Nothing Then On Error Resume Next
zPO = "PO" & Right(Target.Value, Len(Target.Value) - 3)
On Error GoTo 0
u = Sheets("Purchase Orders").Range("A65536").End(x1up).Row
Sheets("Purchase Orders").Range("A" & u + 1) = zPO
End If
End Sub

How can I edit this Macro to carry the same information to a third
location(column) in the workbook on a third sheet with VB (Vendor bills) as
the zVB vale.

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
to adjust download officegirl Excel Discussion (Misc queries) 1 April 7th 09 04:36 PM
Adjust %'s across cells Abe[_2_] Excel Discussion (Misc queries) 2 May 20th 08 10:36 PM
I need to adjust the date Irbe Excel Discussion (Misc queries) 2 April 30th 08 02:50 AM
cells don't adjust boraguru Excel Discussion (Misc queries) 2 September 7th 05 03:11 PM
cells don't adjust boraguru Excel Discussion (Misc queries) 0 September 7th 05 01:05 AM


All times are GMT +1. The time now is 08:12 AM.

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"