+ Reply to Thread
Results 1 to 6 of 6

VBA lookup from another sheet

  1. #1
    Registered User
    Join Date
    04-18-2017
    Location
    NW,UK
    MS-Off Ver
    MS Office 2013
    Posts
    89

    VBA lookup from another sheet

    Hello Everyone

    In Cell C2 i would like it to do a lookup which would work the same as the below vlookup and then repeat until the last row of data in cell C1.

    Please Login or Register  to view this content.
    I managed to get a vlookup to work if i had the results in P2 for example, but i need the results in C2 so tried using indexmatch but i couldnt get any results to appear.


    Thank you in advance

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: VBA lookup from another sheet

    VLOOKUP and INDEX MATCH are formula functions, but you have posted in the VBA section. You probably don't need VBA for what you want to do, though.

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: VBA lookup from another sheet

    Here is a tutorial on using worksheet functions in VBA.

    http://www.cpearson.com/excel/Callin...ionsInVBA.aspx
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    04-18-2017
    Location
    NW,UK
    MS-Off Ver
    MS Office 2013
    Posts
    89

    Re: VBA lookup from another sheet

    Hello Ali GW

    I have a heavy macro based workbook which creates production schedules so i cant go down the manual route, but here is example of what i would like




    thank you in advance
    Attached Files Attached Files

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: VBA lookup from another sheet

    Try this:

    Please Login or Register  to view this content.
    Then check out the link in my prior post for a clear understanding.

  6. #6
    Registered User
    Join Date
    04-18-2017
    Location
    NW,UK
    MS-Off Ver
    MS Office 2013
    Posts
    89

    Re: VBA lookup from another sheet

    Thanks alansidman, that did the trick

+ 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] lookup data from origin sheet to new sheet with switch column header.
    By kimudao in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2015, 09:44 AM
  2. Replies: 6
    Last Post: 07-26-2015, 03:43 AM
  3. Lookup Value from Sheet 4 in Sheet 2, if found copy Sheet 2 Active Row to Sheet 5
    By lgosso23 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2013, 02:51 PM
  4. [SOLVED] Excel Macro to lookup sheet name with a range of cells and paste in the reference sheet
    By mishaq in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-08-2013, 02:55 PM
  5. [SOLVED] Lookup up from Sheet 1 in Sheet 2 and display additional value in Sheet 1 when match
    By azbridgie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2013, 03:22 PM
  6. Replies: 1
    Last Post: 11-07-2012, 01:57 PM
  7. Replies: 11
    Last Post: 10-14-2012, 01:03 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