+ Reply to Thread
Results 1 to 3 of 3

Enter different data into a cell and have it create a log on another sheet

Hybrid View

lo0 Enter different data into a... 09-11-2012, 02:45 PM
GaidenFocus Re: Enter different data into... 09-11-2012, 02:55 PM
lo0 Re: Enter different data into... 09-11-2012, 03:04 PM
  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    9

    Enter different data into a cell and have it create a log on another sheet

    In Sheet1 I have a value in cell C70 in that is calculated using formulas based on cells D11 to D19.

    When a value in cells D11 to D19 is altered, I want cell C70 to be appear in cell A2 in Sheet2
    When a value in cells D11 to D19 is altered again, I want the new value in C70 to appear in cell A3 in sheet 2 (i.e. below the previous value)
    etc

    So far I have

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$C$70" Then Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1) = Target.Value
    End Sub

    However this only works when C70 is changed, not D11 to D19. How do I change the above formula to do this.

    Thanks

  2. #2
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Enter different data into a cell and have it create a log on another sheet

    Try this

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$D$11" or target.address = "$D$12"or target.address = "$D$13" or target.address = "$D$14" or target.address = "$D$15" or target.address = "$D$16" or target.address = "$D$17" or target.address = "$D$18" or target.address = "$D$19"  Then 
    Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1) = Target.Value
    end if
    End Sub
    Last edited by GaidenFocus; 09-11-2012 at 02:59 PM.

  3. #3
    Registered User
    Join Date
    08-24-2012
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Enter different data into a cell and have it create a log on another sheet

    The code you suggested does:
    When either cell D11 or D19 are changed, these values are listed in column A on Sheet2

    However, I am trying to do:
    When cell D11, D12, D13, D14, D15, D16, D17, D18 or D19 are changed, cell C70 is listed in column A on Sheet2

+ 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