+ Reply to Thread
Results 1 to 5 of 5

Code stops working

  1. #1
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Code stops working

    Hi,

    I have some code that produces a name in one cell when a number is put in another cell, this works great. (i got the code from here https://www.excelforum.com/excel-pro...signature.html)

    I am now trying to put the date in an adjacent cell when the name appears using =IF(C1="Name",Today(),"")
    When I do this the code stops working

    I know very little (nothing) about code so any help appreciated!

    Thanks

    Kevin

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Code stops working

    This code and formula shall work fine together.
    of course you may try do everything via VBA (in worksheet code), similar to:
    Please Login or Register  to view this content.
    or attach sample file
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Code stops working

    Kaper,

    Thank you for your response, I have attached a sample file, the code is a little different then above as i am trying to learn VBA and have been playing with it.
    I would like to do it all in code, but I am still very curious as to why it wouldn't work with a fourmal?

    Thanks for looking

    Kevin
    Attached Files Attached Files

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Code stops working

    Hi Kevin,
    see:
    Please Login or Register  to view this content.
    If it is a timestamp, it basically cannot be done with formula
    HAs to be in VBA.
    Because with formula, the value of D1 will be refreshed (and new date/time inserted) every time the worksheet is recalculated (for instance after change in A1 or X12 or wherever)
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Code stops working

    Hi Kaper,

    Many thanks works great. how would add If name is deleted then delete timestamp?

    Thank you

    Kevin

+ 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. SSN Format Code Works... Then stops working?
    By sgtclaire in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2013, 09:43 AM
  2. Code stops working until I reboot
    By AndrewMac in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-15-2013, 07:46 PM
  3. [SOLVED] VBA code stops working when I lock the workbook for use
    By Sleepyshy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2013, 02:55 PM
  4. Removing code line stops code working?!?!?
    By adamj1910 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2012, 02:36 PM
  5. code stops working when i put a formula in the cell
    By Sarangsood in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-20-2011, 12:00 PM
  6. [SOLVED] code stops working after X rows.
    By colwyn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2008, 03:14 PM
  7. [SOLVED] Create button code stops working
    By Stuart in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-01-2005, 05:06 PM
  8. VB Code stops working
    By Michelle K in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-28-2005, 05:06 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