+ Reply to Thread
Results 1 to 2 of 2

Getting Value off a range on 1 sheet to another sheet

  1. #1
    Registered User
    Join Date
    07-22-2013
    Location
    coventry
    MS-Off Ver
    Excel 2007
    Posts
    9

    Getting Value off a range on 1 sheet to another sheet

    Hi all

    can any one help me please.
    i have a reporting spreadsheet which has 4 worksheets on : Daily input, daily Graphs,Weekly Input, Weekly graphs. I have put an array formula on daily graphs from daily input which changes the graphs to the week number i input. also the weekly input works out automaticly from the daily input.

    What i now need is when i input to weekly range on the weekly graph b5 & e5. That it looks for the week number on the weekly input worksheeet and copies all the data off that spreadsheet onto weekly graphs spreadsheet on line 97 I was given a formula off here to do this on just a spreadsheet for the weekly figures but when a added the daily spreadsheets it would not work the formula was

    Option Explicit

    Sub PullData()
    Dim ws1 As Worksheet, ws2 As Worksheet
    Dim LR2 As Long, sWk As Long, eWk As Long

    Set ws1 = Sheet1
    Set ws2 = Sheet2

    With ws1
    .UsedRange.Offset(2, 0).Cells.Clear
    sWk = .Range("B4").Value
    eWk = .Range("E4").Value
    End With
    With ws2
    LR2 = .Cells.Find("*", .Cells(Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
    SearchDirection:=xlPrevious).Row
    .AutoFilterMode = False
    .Range("A4:G" & LR2).AutoFilter Field:=1, Criteria1:=">=" & sWk, _
    Operator:=xlAnd, Criteria2:="<=" & eWk
    .Range("A4:G" & LR2).SpecialCells(xlCellTypeVisible).Copy
    ws1.Range("A6").PasteSpecial (xlPasteValues)
    .AutoFilterMode = False
    Application.CutCopyMode = False
    End With
    End Sub


    log test Question.xlsm

    Any help very much appreicated
    Last edited by bulkodave; 07-31-2013 at 03:59 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Getting Value off a range on 1 sheet to another sheet

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to copy data range form one sheet to other sheet with desire Reverse Transpose ?
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-18-2013, 12:30 PM
  2. Populating a range in one sheet with a range from another sheet based a cells value
    By Aaron719 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-10-2013, 05:56 AM
  3. Replies: 0
    Last Post: 09-12-2012, 02:12 AM
  4. [SOLVED] Search for heading in data sheet and copy range to corresponding sheet in master workbook
    By sans in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-07-2012, 10:02 AM
  5. Replies: 3
    Last Post: 11-21-2011, 05:42 AM

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