Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: formula woes

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Huntington Beach, CA USA
    Posts
    327
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Private Sub CommandButton1_Click()
    Dim rng As Range
    Dim rw As Integer
    Dim dest As String

    With Selection
    If [E6 = E47] Then
    [G51].Value = [G47 - E6]
    End If
    Range("B6:G6").Select
    Selection.Copy
    ActiveSheet.Paste
    Application.CutCopyMode = False
    End With
    End Sub

    The long and the short of it is it's not
    performing the subtraction, but it does the
    copy and paste

    Any help would be appreciated

    James

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-22 15:17, James wrote:
    Private Sub CommandButton1_Click()
    Dim rng As Range
    Dim rw As Integer
    Dim dest As String

    With Selection
    If [E6 = E47] Then
    [G51].Value = [G47 - E6]
    End If
    Range("B6:G6").Select
    Selection.Copy
    ActiveSheet.Paste
    Application.CutCopyMode = False
    End With
    End Sub

    The long and the short of it is it's not
    performing the subtraction, but it does the
    copy and paste

    Any help would be appreciated

    James
    I don't follow what you are doing, but this should capture the problems with the IF statement, unless [E6] = [E47] is always FALSE.


    If [E6] = [E47] Then
    [G51].Value = [G47] - [E6]
    End If

    HTH,
    Jay

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Huntington Beach, CA USA
    Posts
    327
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    No dice, it will copy and paste but ignores
    the fomula???

    James

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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