Results 1 to 3 of 3

conditional copy from different sheet

Threaded View

bitap conditional copy from... 06-17-2011, 08:55 AM
p24leclerc Re: conditional copy from... 06-17-2011, 07:34 PM
bitap Re: conditional copy from... 06-18-2011, 01:25 AM
  1. #1
    Registered User
    Join Date
    05-21-2010
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    7

    conditional copy from different sheet

    I am new to vb script.I want to copy data from worksheets to a summary worksheet if date in summary worksheet matches the time in the different worksheets.the different worksheets contain hourly data for diff dates.Once i have all the data in a summary worksheet i can find the monthly average.in summary sheet i have the times in column A and IN "11013di" sheet i have the dates in D and data in E I tried this-

    Public Sub MoveData()
    
    Dim Summary As Worksheet
    Dim Day As Worksheet
    Dim DateRange As Range
    Dim ValueRange As Range
    Dim cell As Range
    
    Set Summary = Sheets("Summary")
    Set Day = Sheets("110131di")
    Set DateRange = Summary.Range("D2")
    Set ValueRange = Summary.Range("E2")
    
    For i = 2 To 25
      For j = 2 To 25
    If Worksheets("110131di").Cells(4, i).Value = Sheets("Summary").Cells(1, j) Then
       Sheets("Summary").Cells(2, j) = Worksheets("110131di").Cells(5, i)
       Else
       End If
       Next j
       Next i
    
    
    End Sub
    Last edited by Leith Ross; 06-17-2011 at 02:16 PM. Reason: Added Code Tags

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