Results 1 to 6 of 6

Dont trigger code if -1 column of target column has already value Worksheet change event

Threaded View

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    Dont trigger code if -1 column of target column has already value Worksheet change event

    hi,
    i am using this code to add some formulas when i input data in range f10:f1000
    if cells(Target.Row, "E") has already formula or value then don't trigger this code

    thank you

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Target = "" Then Exit Sub
    If Not Intersect(Target, Range("F10:F1000")) Is Nothing Then
        Cells(Target.Row, "A") = "=IFERROR(INDEX(ENTRY_SSP,MATCH(RC[5],ENTRY_CODE,0)),"""")"
        Cells(Target.Row, "B") = IFERROR(IND"=EX(ENTRY_NAMES,MATCH(RC[4],ENTRY_CODE,0)),"""")"
        Cells(Target.Row, "C") = "=IFERROR(INDEX(ENTRY_MANID,MATCH(RC[3],ENTRY_CODE,0)),"""")"
        Cells(Target.Row, "D") = "=IFERROR(INDEX(ENTRY_NNN,MATCH(RC[2],ENTRY_CODE,0)),"""")"
        Cells(Target.Row, "E") = "=IF(ROW()=10,""1"",R[-1]C+1)"
    End Sub
    i mean trigger only one time when i put value in range f10:f1000

    for example
    i input some data in range f10
    then this will add this formula to

    a10= formula
    b10= formula
    c10= formula
    d10= formula
    e10= formula

    and again i type some data in f10
    now dont trigger the code because a10, b10, c10.....ae10 have already formulas

    thank
    Last edited by HaroonSid; 07-05-2017 at 08:02 AM.
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Dont trigger code if i delete some value from range Worksheet change event
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2017, 07:48 AM
  2. Worksheet change event copy paste dont call a macro
    By ricklou in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2017, 04:26 PM
  3. [SOLVED] Worksheet Change Event Wrongly Trigger
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2014, 11:00 PM
  4. [SOLVED] Setting Target for Worksheet Change Event
    By mrbickelsworth in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-19-2013, 02:36 PM
  5. Trigger column value changes in worksheet WS2 based on value change in WS1 column
    By sunny89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2010, 12:04 PM
  6. [SOLVED] Cell value change to trigger macro (worksheet change event?)
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2006, 10:00 AM
  7. Worksheet Change Event-change event to trigger
    By Steph in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2005, 06:05 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