Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
to adjust download | Excel Discussion (Misc queries) | |||
Adjust %'s across cells | Excel Discussion (Misc queries) | |||
I need to adjust the date | Excel Discussion (Misc queries) | |||
cells don't adjust | Excel Discussion (Misc queries) | |||
cells don't adjust | Excel Discussion (Misc queries) |