+ Reply to Thread
Results 1 to 4 of 4

Drop Down Arrow Changes - Todays Date Is Created In Cell

Hybrid View

  1. #1
    Registered User
    Join Date
    01-20-2014
    Location
    london, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Drop Down Arrow Changes - Todays Date Is Created In Cell

    tester neb.xls

    Here is an attached Sample of my workbook.

    I've got equipment that comes and goes, I like to keep a track of it by simply using a drop down arrow list and selecting whether equipment has been sent off for repair, on loan etc.

    When I change the selection in the drop down list, the column next to it puts todays date in it, so that I can log when the update was made.
    I've had to delete a few rows, as equipment has been decomissioned etc. Now that I've down that, the formula isn't working anymore and I can't understand why. I'm a complete novice with VBA, so laymans terms please!

    Would anyone be willing to take a look at my formula and streamline it so that I can easily add or remove new rows in my table? Whilst also being able to change my selection in the lists and have todays date appear in the adjacent column?

    Many thanks to all on here that have the time to help.

  2. #2
    Forum Contributor LokeshKumar's Avatar
    Join Date
    03-31-2015
    Location
    India
    MS-Off Ver
    All, mostly 2010 now..
    Posts
    471

    Re: Drop Down Arrow Changes - Todays Date Is Created In Cell

    Hi,

    Your code should look like this
    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Intersect(Target, Range("B13:B34")) Is Nothing Then Exit Sub
    
    Target.Offset(0, 1).Value = Date
    Application.EnableEvents = True
    
    End Sub
    There is a list in Range "B13:B34" so in case you increase or decrease "Location" then adjust accordingly....
    If you get an error then pls remove the library (it will always start with Missing) .....however I am attaching the sheet for your reference....tester neb.xls

    If your question is resolved, mark it SOLVED using the thread tools. Click on the star if you think some-1 helped you.
    Lokesh Kumar
    Stay Hungry.. Stay Foolish..
    _________________________________________________________
    Please Click STAR to Add Reputation if my/someone's answer helped!

  3. #3
    Registered User
    Join Date
    01-20-2014
    Location
    london, England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Drop Down Arrow Changes - Todays Date Is Created In Cell

    Hi,

    It doesn't seem to be working. I don't understand why the range is B13:B34? The last row is on B26?

    Also, I've tried adding this code to my spreadsheet and it hasn't worked. Again I'm a complete novice at this, it would be very handy if you could show me where this code needs to be place so that it.

    As soon as I add/remove a row it messes up the formula and comes up with a debug?

    Perhaps the way inwhich I've set this up is a little bit too complicated for me to handle!


    Basically all I'm after is a simple spreadsheet that can easily add/remove rows, have drop down lists in the Location column and when a list is changed, todays date is put into the adjacent cell in the Since (Date) column.

    If there's a more simple, efficient way of a novice doing this, I'd be much appreciated.

    Thanks again

  4. #4
    Forum Contributor LokeshKumar's Avatar
    Join Date
    03-31-2015
    Location
    India
    MS-Off Ver
    All, mostly 2010 now..
    Posts
    471

    Re: Drop Down Arrow Changes - Todays Date Is Created In Cell

    Hi,
    It doesn't seem to be working. I don't understand why the range is B13:B34? The last row is on B26?
    Yes you are right it should be
    Range("B13:b26"))
    Image......Attachment 390851
    As per this image just click on Sheet3 on then click on View code and paste the code.......after changing the range as required.

+ 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: 8
    Last Post: 11-08-2014, 09:59 AM
  2. Opening a drop down list on the value defined by todays date.
    By jshaw82 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 09:29 AM
  3. Using VB to find a range based on todays date and todays date +30
    By Steve_al in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2009, 09:31 AM
  4. in-cell drop-down arrow missing
    By retep in forum Excel General
    Replies: 6
    Last Post: 06-21-2005, 12:05 PM
  5. [SOLVED] Drop-down arrow only visible when cell selected
    By John Richards in forum Excel General
    Replies: 2
    Last Post: 03-04-2005, 08:06 AM

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