+ Reply to Thread
Results 1 to 9 of 9

VBA Macro Pulling data using Vlookup from one sheet to another!

  1. #1
    Registered User
    Join Date
    07-28-2016
    Location
    United State
    MS-Off Ver
    2010
    Posts
    43

    VBA Macro Pulling data using Vlookup from one sheet to another!

    Hello,
    I was wondering if someone could help me to pull data from one sheet to another sheet in multiple columns at once using VBA.
    - Sheet “Personnel information” contains all active and inactive employees
    - Sheet “Data to Upload” contains some of the information from “Personnel Information” and some from “Manually Calculated Data” sheet
    I like to perform a VLOOKUP by social security in column “D” in “Data to Upload” sheet and Column “C” in “Personnel Information” sheet to pull data for below columns into “Data to Upload” sheet from “Personnel Information” sheet.
    Column J
    Column K
    Column L
    Column M
    Column O
    Column P
    Column Q

    Please see attached copy of the sheet.
    Thank you in advance for your help.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-28-2016
    Location
    United State
    MS-Off Ver
    2010
    Posts
    43

    Re: VBA Macro Pulling data using Vlookup from one sheet to another!

    Hello Forum,

    I wrote below code for it but it is too long and it is running so slow when I run it. any suggestion?

    Please Login or Register  to view this content.
    Last edited by Saeidian; 12-11-2016 at 03:11 PM.

  3. #3
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro Pulling data using Vlookup from one sheet to another!

    Hi Saeidian

    See if this Code in the attached gets you where you need to go. CTRL + x will fire the Code.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    07-28-2016
    Location
    United State
    MS-Off Ver
    2010
    Posts
    43

    Re: VBA Macro Pulling data using Vlookup from one sheet to another!

    Hello John,

    Thank you so much for the code, it works great! I also need to transfer data in the same fashion from a third worksheet within the same workbook. Social security is in the same format of the other two sheet. Is it possible to add more code your VBA code to pull tow column from the third sheet and how would you do that? I tried following and added more code to what you had previously post it but it did not work!

    Thank you so much!

    Have a great weekend!

    Please Login or Register  to view this content.
    Last edited by Saeidian; 12-16-2016 at 08:36 PM.

  5. #5
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro Pulling data using Vlookup from one sheet to another!

    Hi Saeidian

    Sure...attach your Workbook (with revised Code). Make certain the Sheet Names are the SAME as referenced in the Code as they were not in your original attachment...I'll look at it.

  6. #6
    Registered User
    Join Date
    07-28-2016
    Location
    United State
    MS-Off Ver
    2010
    Posts
    43

    Re: VBA Macro Pulling data using Vlookup from one sheet to another!

    Thank you John!

    Please see attached file as well as the code.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Saeidian; 12-16-2016 at 09:45 PM.

  7. #7
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro Pulling data using Vlookup from one sheet to another!

    Hi Saeidian

    If you'd run the Code you posted you will have gotten an error here (Subscript Out of Range)...check the spelling. You'll get other errors..you need to fix this one...I'll help with the others.

    Make certain the Sheet Names are the SAME as referenced in the Code
    Please Login or Register  to view this content.
    Put your Code IN THE WORKBOOK...run it...attach it...show us the errors...I could do all the work...

  8. #8
    Registered User
    Join Date
    07-28-2016
    Location
    United State
    MS-Off Ver
    2010
    Posts
    43

    Re: VBA Macro Pulling data using Vlookup from one sheet to another!

    Thank you so much John! Excellent! I really appreciate you help with this thread! Happy Holidays to you and yours!

  9. #9
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro Pulling data using Vlookup from one sheet to another!

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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. Vlookup data by pulling below row.
    By leakhna in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-03-2015, 01:54 AM
  2. macro for spotting text from one list to another, then pulling in data with vlookup
    By cwchan220 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-03-2014, 11:54 PM
  3. Need help with Vlookup / Pulling from another sheet.
    By Funkis in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-19-2013, 06:17 PM
  4. VLOOKUP is not Pulling from the Correct Sheet
    By randalbg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-01-2013, 09:46 AM
  5. [SOLVED] Need An Excel Macro for Pulling in Data from one sheet to Another
    By chiru7963 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-11-2012, 09:11 AM
  6. Macro Pulling Data from Hidden Sheet Creates Error
    By MrBill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2010, 02:17 PM
  7. Pulling Information in seperate sheet based on data in current sheet
    By joekunin in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-03-2009, 05:06 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