+ Reply to Thread
Results 1 to 1 of 1

Can we put a new Add-on code ?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-11-2012
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    321

    Can we put a new Add-on code ?

    This is my code
    I want to add a code which will paste the values of I2 and/ or J2 in a the last available row in column A and B every time it changes( ie calculated)
    In this case the first row available will be A3,B3 ( assuming that there is no B3 discussed below)
    The value in B2 is going to be a live changing integer and there will be no B3(it is here to experiment).

    Dim OldValue1
    Private Sub Worksheet_Calculate()
    If [B2] > OldValue1 Then
        Application.EnableEvents = False
            [I2] = [B2] - OldValue1
            
            OldValue1 = [B2]
        Application.EnableEvents = True
    End If
    If [B2] < OldValue1 Then
        Application.EnableEvents = False
            [J2] = [B2] - OldValue1
            
            OldValue1 = [B2]
        Application.EnableEvents = True
    End If
    End Sub
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 03-09-2013, 04:30 AM
  2. Adding Text to another cell VB code (Help Tweeking code) (Excel 2007)
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2012, 11:37 AM
  3. Code for email alerts from excel isn't working, wrong code possibly?
    By jessthorogood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 01:45 AM
  4. Replies: 2
    Last Post: 03-17-2011, 08:55 PM
  5. Replies: 0
    Last Post: 10-06-2006, 09:05 AM

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