+ Reply to Thread
Results 1 to 2 of 2

automatically data from one worksheet to another worksheet

Hybrid View

z-eighty2 automatically data from one... 06-17-2013, 12:17 PM
xladept Re: automatically data from... 06-17-2013, 01:39 PM
  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    pakistan
    MS-Off Ver
    Excel 2007
    Posts
    89

    Thumbs up automatically data from one worksheet to another worksheet

    Hi,

    I need a formula OR VBA Code

    I am working on two different worksheets. In both worksheets I have 5 columns " Date" , " Customer Name" , "Invoice number", "payment Received", "Amount Receivable".

    I want when in my main worksheet #1 when any Payment is received for a particular invoice . The data of only column "Payment Received" should be automatically update to second sheet row by looking/searching that particular " invoice number " .

    Any formula or VBA please

    Plz Help..

    Thanks

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: automatically data from one worksheet to another worksheet

    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 4 Then
    
    Dim w2 As Worksheet, INo As String, Pay As Single, F As Range
    Set w2 = Worksheets("Sheet2"): INo = Target.Offset(0, -1)
            Set F = w2.Range("C:C").Find(INo)
            If IsNumeric(F.Offset(0, 1)) Then
            Pay = F.Offset(0, 1): Pay = Pay + Target
            Else
            Pay = Target: End If
            F.Offset(0, 1) = Pay
    
    End If: End Sub
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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