Results 1 to 20 of 20

VBA Code - If cell value = "xxx" then cell value = "yyy"

Threaded View

  1. #15
    Registered User
    Join Date
    12-07-2013
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    91

    Re: VBA Code - If cell value = "xxx" then cell value = "yyy"

    Ajryan, sorry to bother you again, but i am now trying to offset the column to the left. So basically if values of cells in column J is "Reset to Draft" then cells in column F will equal "Draft"

    This is the current code i have but nothing is happening?

    Private Sub Worksheet_Change2(ByVal Target As Range)
        Dim rng As Range
        Dim cell As Range
        
        Set rng = Me.Range("J3:J400")
    
        If Not rng Is Nothing Then
            For Each cell In rng.Cells
                If cell.Value = "Reset to Draft" Then
                    Application.EnableEvents = False
                    cell.Offset(0, -4).Value = "Draft"
                    Application.EnableEvents = True
                End If
            Next
        End If
        
        Set rng = Nothing
    End Sub

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  2. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  3. [SOLVED] Data validation: allow entry into a cell if other three cells have "X", "Y" and "Z"?
    By RogerRangeRover in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2013, 04:49 AM
  4. Replies: 0
    Last Post: 11-20-2012, 10:22 AM
  5. Replies: 1
    Last Post: 01-30-2006, 06:10 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