+ Reply to Thread
Results 1 to 2 of 2

Exporting data from on sheet across entire workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    Brooklyn, New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Post Exporting data from on sheet across entire workbook

    I need to distribute the daily dollar amount for each merchant from "DAILY DEPOSITS" onto each merchants individual sheet for that date.

    On the daily DAILY DEPOSITS sheet, the date and amount is changed everyday.

    For example on the "DAILY DEPOSITS" sheet ACCENT BRIDAL(C4) had $1.00(D4) for 10/06/12. I need this to be reflected on the "ACCENT BRIDAL" sheet showing a deposit of $1.00 for 10/06/12 in cell C98.

    If anyone can give me any help on this I would highly appreciate it.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Exporting data from on sheet across entire workbook

    Hello ,

    The macro below has been attached to a button on the "Daily Deposits". The attached workbook contains the button and the macro.
    Sub RecordDeposits()
    
        Dim Cell As Range
        Dim DepDate As Range
        Dim Rng As Range
        Dim Wks As Worksheet
        
        
            Set Rng = Worksheets("Daily Deposits").ListObjects(1).DataBodyRange
            
                For Each Cell In Rng.Columns(2).Cells
                
                    If Not IsEmpty(Cell) Then
                        On Error Resume Next
                            Set Wks = ThisWorkbook.Worksheets(Cell.Text)
                            
                            If Err = 9 Then
                                MsgBox "The worksheet '" & Cell.Text & "' was not found." & vbCrLf _
                                      & "Please check the spelling and spaces.", vbExclamation
                                Err.Clear
                            Else
                                Set DepDate = Wks.Columns(2)
                                Set DepDate = DepDate.Find(Cell.Offset(0, -1).Text, , xlValues, xlWhole, xlByRows, xlPrevious, False, False, False)
                                
                                If Not DepDate Is Nothing Then
                                    DepDate.Offset(0, 3).Value = Cell.Offset(0, 1)
                                End If
                            End If
                        On Error GoTo 0
                        
                    End If
                
                Next Cell
            
    End Sub
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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