+ Reply to Thread
Results 1 to 2 of 2

copy and retain information from a data entry sheet to trending sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    Findlay, OH
    MS-Off Ver
    Excel 2007
    Posts
    33

    copy and retain information from a data entry sheet to trending sheet

    Right now I have a data entry sheet and I want to enter information daily, then have it transfer to the trending sheet. I have an array and it is erasing the information as it changes on data entry sheet. How do I get the previous day to also stay on the trending sheet when the data entry date changes.

    see attachment
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: copy and retain information from a data entry sheet to trending sheet

    Try this code - You can populate the data in the Rhonda sheet and then run the macro. The data will move to the next sheet in the appropriate column -
    Option Explicit
    
    Sub trending()
    Dim i As Long, lcol As Long
    
    Application.ScreenUpdating = False
    
    With Worksheets("Trending MINS")
        lcol = .Range("XFD2").End(xlToLeft).Column
        For i = 2 To lcol
            If .Cells(2, i).Value = Worksheets("Rhonda").Range("M2").Value Then
                Worksheets("Rhonda").Range("O3:O39").Copy
                .Cells(3, i).PasteSpecial (xlPasteValues)
                .Cells(19, i).ClearContents
                .Cells(36, i).ClearContents
            End If
        Next i
    End With
    
    Msgbox "Transfer complete"
    
    Application.ScreenUpdating = True
    
    End Sub
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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