+ Reply to Thread
Results 1 to 6 of 6

IF Range Value True

  1. #1
    Registered User
    Join Date
    09-14-2011
    Location
    lisbon
    MS-Off Ver
    Excel 2007
    Posts
    3

    IF Range Value True

    Good afternoon

    I´m trying to set a Private Sub Worksheet_Change where everytime the value "ENTRY" is detected on the column C, the correspondent cell on column D is filled with the current date.

    I´ve found a code thats more or less what i need:

    Please Login or Register  to view this content.
    Problem is, that I need to define the value "Entry" somewhere on this code. I need it to fill the current date only when he detects this value.

    Any help is appreciated.

    Thank you
    Last edited by zarahel; 09-14-2011 at 12:54 PM.

  2. #2
    Registered User
    Join Date
    09-14-2011
    Location
    lisbon
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: IF Range Value True

    Ok, so I found how to do it

    But i still have one last problem.

    Please Login or Register  to view this content.
    Now, I just need to make one last validation. I want it to write the date on target 2 only if the cell is empty. If it has any value it shouldn´t do anything.

    Anyone?

  3. #3
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: IF Range Value True

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: IF Range Value True

    Sorry did not see that it was already answered..

    The second part can be accomplished:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: IF Range Value True

    Since you're using the Change event handler, if you are going to change the value of a cell, you need to temporarily disable events to prevent the procedure from calling itself recursively. Something like this:
    Please Login or Register  to view this content.
    Hope that helps,

    Colin

    RAD Excel Blog

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: IF Range Value True

    Please Login or Register  to view this content.



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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