+ Reply to Thread
Results 1 to 2 of 2

Need help Referencing Other worksheets

  1. #1
    Registered User
    Join Date
    07-26-2016
    Location
    Alberta, Canada
    MS-Off Ver
    2013
    Posts
    4

    Need help Referencing Other worksheets

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    For i = 1 To 18
    Cells(i + 11, 7).Value = Application.VLookup("CFM", Worksheets("Sheet3").Range(Cells(35, 2), Cells(39, 19)), Application.Match(Cells(i + 11, 6), Worksheets("Sheet3").Range(Cells(35, 2), Cells(35, 19)), 0))
    Cells(i + 11, 9).Value = Application.VLookup("HP", Range(Cells(35, 2), Cells(39, 19)), Application.Match(Cells(i + 11, 6), Range(Cells(35, 2), Cells(35, 19)), 0))
    Cells(i + 11, 11).Value = Application.VLookup("AMP", Range(Cells(35, 2), Cells(39, 19)), Application.Match(Cells(i + 11, 6), Range(Cells(35, 2), Cells(35, 19)), 0))
    Cells(i + 11, 12).Value = Application.VLookup("RPM", Range(Cells(35, 2), Cells(39, 19)), Application.Match(Cells(i + 11, 6), Range(Cells(35, 2), Cells(35, 19)), 0))
    Next i
    End Sub
    w

    I am very new to VBA, so I am encountering many issues trying to figure this out, but here's the first..
    This is my code, Bolded portion is where the issue is... Code works fine when I am not trying to reference a different worksheet, but as soon as I do this it seems to get upset with me..

  2. #2
    Registered User
    Join Date
    07-26-2016
    Location
    Alberta, Canada
    MS-Off Ver
    2013
    Posts
    4

    Re: Need help Referencing Other worksheets

    Oh, and Cells(i + 11, 11), this line appears to not be working correctly aside from being the exact same as the others...

+ 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] Referencing Across Worksheets
    By forexcellence13 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-10-2013, 02:06 AM
  2. Consolidating worksheets and then referencing the worksheets themselves in a new column
    By zed commander in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2012, 05:14 AM
  3. Referencing other worksheets?
    By ajcasey88 in forum Excel General
    Replies: 8
    Last Post: 02-28-2012, 08:15 PM
  4. referencing other worksheets and then some
    By justdoit04 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2011, 02:57 AM
  5. Referencing ALL worksheets
    By s4lancia in forum Excel General
    Replies: 2
    Last Post: 03-24-2007, 10:30 AM
  6. Referencing Worksheets
    By Cincy in forum Excel General
    Replies: 4
    Last Post: 07-19-2006, 04:05 PM
  7. Referencing worksheets
    By [email protected] in forum Excel General
    Replies: 3
    Last Post: 05-13-2006, 09:40 AM
  8. Referencing worksheets
    By NewExcelGuy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2005, 01:05 PM

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