+ Reply to Thread
Results 1 to 9 of 9

VB Code to match data and bring to another sheet.

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to match data and bring to another sheet.

    Hello:

    Please refer to attached file.
    I have data in Sheet1 which shows Employee Names in row 1 with REG HR and OT HR Column.
    Now i have Summary sheet where I will have all employees listed in colunm C as shown.
    I need VB Code to bring REG HR and OT HR from Sheet1 into Summary Sheet for Date between cell C2 and C3 and put in respected
    cell in column D and E.

    Let me know if you have any questions.
    Thanks.

    R
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VB Code to match data and bring to another sheet.

    No VBA needed, formulas Index en match can do


    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to match data and bring to another sheet.

    Hello LeoTaxi and Others:

    I need VB Code for the above because it is part of other macro process.
    (Next Step is to delete rows with zero in column D. Assume all cells in column D are zero, in this case if i delete rows then all formulas will be deleted and have to manually input the formula..I am hoping this is clear why i need VB Code to perform above).
    So would really appreciate if VB Macro is done.

    Please let me know if you have any questions.
    Thanks.

    Riz

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VB Code to match data and bring to another sheet.

    Try the attached.
    Attached Files Attached Files
    Last edited by AB33; 06-05-2016 at 08:52 AM.

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to match data and bring to another sheet.

    Hi AB33:

    Thanks for the help...After trying out in my actual worksheet, it seems to malfunction.
    Please refer to attached file.
    In Summary Sheet "OT" Button is linked to your code.
    Have a look at the data which got copied.
    Let me know if you have any questions.
    Thanks.
    Riz
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VB Code to match data and bring to another sheet.

    I know the code is very sensitive to moving a single row or column. The code is password protected. I could adjust it on my own book, but I am not sure now which sheet is the source or raw data sheet.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VB Code to match data and bring to another sheet.

    Assuming the source sheet is Final-Semi-MonthlyHrs, try the attached. Let me know if you need adjustment
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to match data and bring to another sheet.

    Hi AB33:

    Seems to work..
    Can i accomplish one more small request.
    Add code to delete rows with cell in column D and E equal zero.
    Please let me know if you have any questions.
    Thanks.
    R
    Last edited by rizmomin; 06-05-2016 at 01:18 PM.

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VB Code to match data and bring to another sheet.

    Hi Riz,
    Try the attached.
    The code works on the sample attached and is very sensitive to moving a row or column. PM if you change the layout in weeks time.
    Attached Files Attached Files

+ 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] VB Code or formula to bring data from other sheet
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2016, 02:50 PM
  2. Bring Data from other sheet
    By rizmomin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-27-2015, 04:49 PM
  3. Macro to bring data to sheet from another sheet!!! based on certain criteria
    By cory0789 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2015, 06:43 AM
  4. vba/code to bring up msg box when critaria is met that contains data from comment box
    By xwarlock10x in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-28-2013, 04:11 PM
  5. Look in another sheet match & bring data back
    By gill389 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2011, 01:56 PM
  6. Replies: 2
    Last Post: 08-29-2005, 05:00 AM
  7. How can i bring data from one sheet to another:
    By tayyab in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-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