Tracking a cell

calecote

New Member
Joined
Oct 5, 2011
Messages
12
I want to be able to measure the progression of a cell that is in a dropdown in Excel. Once the cell "closes" it is important but it is more important to see what the cell was before it was coded as closed. Is there a way to see what the last item in that cell was? maybe put it in another cell?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi calecote,

That can probably be done with VBA. Can you provide some clarification?

1. There are several types of dropdowns in Excel. Are you referring to a Data Validation drop down, an ActiveX combobox, or a Form control?

2. What do you mean by the cell "closes"? I'm guessing you mean after the user selects an item, the dropbox list disappears and the selected value is shown in the cell. Is that right?

3. Do you just want to store the previous value, or by progression, do you need a longer history? If the latter, how many values max?
 
Upvote 0
Hi Jerry,

It is a Data Validation drop down list.

I mean the term close in a business setting. When I am working on a list and I put the cell in "closed" because I do not need to work on it anymore I want to be able to measure what the cell was before it was closed. A progression or simply the last one will work. I just want to be able to measure what the cell was coded as from the list before it was coded as closed.
 
Upvote 0
This seems to work. It assumes you have a your DV drop down in A1. Each time the value in A1 changes the previous value will be placed in B2.

Place this into the Sheet Code Module for that Worksheet.
Code:
Public sPREVIOUS As String

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
    sPREVIOUS = Target.Value
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
    
    If Target.Value <> sPREVIOUS Then
        Application.EnableEvents = False
        Range("B1").Value = sPREVIOUS
        sPREVIOUS = Target.Value
        Application.EnableEvents = True
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top