Results 1 to 1 of 1

VBA to replace previous table and check if one cells value is equal to the previous one

Threaded View

  1. #1
    Registered User
    Join Date
    11-07-2019
    Location
    Lithuania
    MS-Off Ver
    Office 2013
    Posts
    52

    VBA to replace previous table and check if one cells value is equal to the previous one

    Hello,

    I couldn't figure it out on my own so i decided to turn to the professionals.

    I have a Macro in which if a value is entered in a cell right of the table, the table values ,formulas,format from above is copied right below the old one. Now the thing i need is that one of the copied cells would check if it is the same value from the previous table and create pop up: New value (or at least change it's colour). To put it simply i attached a workbook and the whole code. IF a value is entered in G column. The previous cells are copied and pasted nearby. What is need is when a new table is created, to check if (For this instance) B24=B35 and if not create a Message box or at least change it's colour. Thank you for any tips or help.

    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim r As Range
        
        Set r = Target.Cells(1, 1)
        
        If Len(r.Value) = 0 Then Exit Sub
        
        If r.Column <> 7 Then Exit Sub
        If r.Row Mod 11 <> 1 Then Exit Sub
    
        r.Offset(-11, -6).Resize(11, 5).Copy r.Offset(0, -6)
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 02-25-2015, 01:02 PM
  2. [SOLVED] Find certain word, copy and paste cell in previous row if previous row is blank
    By steven_e in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2013, 12:53 PM
  3. Replies: 0
    Last Post: 10-14-2011, 12:09 PM
  4. Autochange equal to or above previous cell
    By hotwoz in forum Excel General
    Replies: 2
    Last Post: 07-06-2011, 12:04 PM
  5. Replies: 3
    Last Post: 01-07-2010, 02:30 PM
  6. If previous filled cell is equal to
    By Directlinq in forum Excel General
    Replies: 12
    Last Post: 03-02-2009, 04:00 PM
  7. Macro to check for blank cell entry, copy previous value, and check for duplicates
    By xPunxNotDeadx in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2009, 06:33 PM

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