+ Reply to Thread
Results 1 to 6 of 6

Macro to Track Prospect Status and Date of Status Change

  1. #1
    Registered User
    Join Date
    05-24-2016
    Location
    Seattle, Washington
    MS-Off Ver
    Office 2010
    Posts
    3

    Macro to Track Prospect Status and Date of Status Change

    I have this macro that does what it is supposed to do, but with a couple of problems. I have a drop-down menu in "Prospect Status" column 14 and in column 15 "Date Status Change," it records the new status and the date to mark when a change is made. The dates collect, to read as so: "App Sent- 04/15/2016 App Received- 05/01/2016". That is great!

    Here are the problems:

    1. It deletes the information in the "Notes" cell in column 13.
    2. I want to move the Prospect Status column to column A, but when I change the "Target, Column" from 14 to 1, it returns an error at line Target.Offset(, -1) = ""

    I am new to macros, so I know I probably am just making a noobie mistake, but if someone could help me figure it out, I would be very grateful.

    Here is the original macro:

    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Not Application.Intersect(Target, Columns(14)) Is Nothing And Target.Count = 1 Then
    If UCase(Target.Text) = "CLOSED" Then
    Target.Offset(, -1) = Date
    Target.Offset(, -3) = Date
    Else
    Target.Offset(, -1) = ""
    Target.Offset(, -3) = ""
    End If
    If Target <> "" Then
    Target.Offset(0, 1) = _
    Target.Offset(0, 1) & Chr(10) & "-" & Format(Now(), "mm-dd-yyyy") & _
    " " & Target.Text
    Target.Offset(0, 1).EntireColumn.AutoFit
    End If
    End If
    Application.EnableEvents = True
    End Sub

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Macro to Track Prospect Status and Date of Status Change

    The column 13 (and 11) are being deleted is because of the
    Please Login or Register  to view this content.
    lines. These lines are telling it to go 1 and 3 rows to the left of the target column, which is 14, and delete or make those cells blank.
    Those same 2 lines are giving you the error when you change the Target from 14 to 1 because using 1 makes it column 1 which is the farthest to the left so it can't offset 1 or 3 columns to the left from there.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    05-24-2016
    Location
    Seattle, Washington
    MS-Off Ver
    Office 2010
    Posts
    3

    Re: Macro to Track Prospect Status and Date of Status Change

    Thanks, Tom.

    Not sure why I would have wanted to do that, but they are gone now and it works.

    For edification purposes, if I want to move the Project Status cell to column 1 and leave the Date Status Changed in column 15, what do I change to make that happen?

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Macro to Track Prospect Status and Date of Status Change

    You're welcome.
    I'm not entirely sure how to go about doing that. I'd have to see a sample workbook of what you have and the result you want....but still not sure I could figure it out.

  5. #5
    Registered User
    Join Date
    05-24-2016
    Location
    Seattle, Washington
    MS-Off Ver
    Office 2010
    Posts
    3

    Re: Macro to Track Prospect Status and Date of Status Change

    Fair enough. At least it works now without erasing anything. I'll tinker with it until it does what I want. Thanks again!

  6. #6
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Macro to Track Prospect Status and Date of Status Change

    Not a problem. And thank you for the feedback and rep!!

+ 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. [SOLVED] Keep date on 'status' change
    By gvergeer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2016, 03:22 AM
  2. [SOLVED] Populate Name and Date for one status only from a list of different status
    By suchetherrah in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-30-2015, 07:31 AM
  3. Change Cell Status after certain date
    By KatrinaA in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-21-2015, 10:25 AM
  4. Replies: 3
    Last Post: 09-11-2014, 04:32 PM
  5. Macro to log and keep track of different status updates
    By iggy68 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2013, 11:57 AM
  6. Replies: 4
    Last Post: 04-08-2012, 09:43 PM
  7. Auto date entry for status change
    By Alec H in forum Excel General
    Replies: 2
    Last Post: 02-06-2006, 08:41 PM

Tags for this Thread

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