Results 1 to 20 of 20

Converting formula to a code

Threaded View

  1. #10
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Converting formula to a code

    Friend, Thanks for your great help...This code is awesome it works great!!!!

    But in my original excel instead of column A,B and C,D i have the columns as Col O,P and Q,R. So i just copy and pasted the coding and made some changes as below. But it is not working in it...Can you clarify where am i going wrong...

    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim isect As Range
    
        If Target.Cells.Count > 1 Then Exit Sub
    
        On Error GoTo ResetApplication
        Application.EnableEvents = False
    
        Set isect = Intersect(Target, Range("O3:O20"))
    
        If Not isect Is Nothing Then
            If Target <> "" Then
                Range("Q" & Target.Row) = Target * 60
            Else
                Range("Q" & Target.Row) = ""
            End If
        End If
    
    ResetApplication:
        Err.Clear
        On Error GoTo 0
        Application.EnableEvents = True
        Set isect = Nothing
    
    End Sub
    Last edited by Paul; 11-30-2010 at 03:33 AM. Reason: Removed quote of full post, unnecessary.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1