LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Combining Macros and if function

Hi,

I'm currently working on an excel worksheet for shipping. I've created
myself a worksheet so that every line is a different shipment. My worksheet
has a VBA function that if Cell L1 ( which is the status of shipment)
contains "shipped" the line will automatically jump to a different worksheet
labeled "shipped orders" now I wanted to maximize efficiency and created an
if function that if Cell N1 contains a UPS tracking number then L1 will
receive "shipped". The if function worked however i was dissapointed to see
that the line didn't jump to the next worksheet. could any of you be of help?



Below find my VBA code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If UCase(Trim(Target.Value)) = "SHIPPED" Then
Application.EnableEvents = False
Target.EntireRow.Copy _
Worksheets("Shipped Orders").Cells(Rows.Count, 1).End(xlUp)(2).EntireRow
Target.EntireRow.Delete
Application.EnableEvents = True
End If

End Sub

thanks in advance,

Perl
 
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
Combining Lookup function and Sum function Cameron Excel Worksheet Functions 2 July 13th 09 02:19 AM
Combining macros aussiegirlone Excel Discussion (Misc queries) 9 June 30th 09 03:14 AM
Combining an IF and MAX function Drummy Excel Discussion (Misc queries) 2 June 4th 06 01:17 PM
Combining an IF and MAX function Drummy Excel Worksheet Functions 2 June 4th 06 08:36 AM
Combining macros GarToms Excel Discussion (Misc queries) 2 February 9th 06 08:51 AM


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