+ Reply to Thread
Results 1 to 7 of 7

VBA find & offset to copy/paste to other worksheet

  1. #1
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    VBA find & offset to copy/paste to other worksheet

    I have several worksheets in my workbook and I would like to find the text "MARK-UP" in each worksheet, then copy the cell contents from the cell that is one row down and one row over from cell containing the text "MARK-UP". For instance, I have a workbook that has multiple sheets, the main sheet, "MASTER" links to the other sheets in my workbook. I would like to automate this process, by finding which cell is one row down and one row over to the right of the cell containing "MARK-UP" in each of the worksheets, and then linking them to the MASTER work sheet. If I have sheet1 and the cell containing "MARK-UP" is in C25 of sheet1, I would like hyperlink a cell in "MASTER" sheet to D26 of Sheet1. Not sure how to use the find function and offset to copy and paste here. Thanks in advance

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: VBA find & offset to copy/paste to other worksheet

    Hi mdolinger,

    Based on my understanding of your description, try the below code which I have provided the sample file I worked on

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by nankw83; 03-26-2021 at 10:31 AM.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Re: VBA find & offset to copy/paste to other worksheet

    @nankw83, thank you for the response. It is very close to what I'm trying to accomplish. My ultimate goal is to have a list of items in "Master" sheet and use VBA to create copy's of a template, name it from the list, and then hyperlink two cells back to the master sheet. I thought I could get a part of the vba and make it work, but I'm a bit lost. I'm trying to loop through Cells B9-B29, create a copy of a template, name it from the list in B9-B29, then hyperlink the newly copied sheets to the list. I then need to link two cells to the master list and that is where this question came in. I've attached a test workbook, as it will probably make more sense. Thanks again,
    Attached Files Attached Files

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: VBA find & offset to copy/paste to other worksheet

    I am not really sure I understand your request. Your file doesn't have a "Master" sheet, are you referring to "Bid Sheet" ? What do you have in cells B9-B29 ? In which sheet ? Could you be more specific or better yet show in the file an example of before & after

  5. #5
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Re: VBA find & offset to copy/paste to other worksheet

    Sorry nankw83, the "Master" Sheet would be the "Bid Sheet". Cells B9-B29 are bid items and I need to copy an existing workbook, "0MAX2RE" for each of the items in B9-B29, then rename it to the names in the list. I then link the cost and markup to the bid sheet from each of those sheets I just copied. I Manually type in the item number, description, qty and units into the "Bid Sheet" then link the cost and markup. I was hoping to automate the rest of the linking after I have input the item#, Description, qty and units.
    Attached Files Attached Files

  6. #6
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: VBA find & offset to copy/paste to other worksheet

    This is what I understood so far & correct me if I'm wrong before jumping into writing the wrong code

    Steps below
    1. Make a copy of sheet "Bid Sheet"
    2. User manually fills in "Description" in column B which could be 1 or more items
    3. Run a macro that will loop through items in column B, update cost & mark up from respective sheet based on column B

    I don't see any connection / or what to do with sheet "0MAX2RE"

  7. #7
    Registered User
    Join Date
    12-17-2015
    Location
    Pennsylvania
    MS-Off Ver
    MS Office 365
    Posts
    85

    Re: VBA find & offset to copy/paste to other worksheet

    @nankw83 I really appreciate your time. I manually fill in the "Bid Sheet" with different items for that bid. I fill out columns A, B, C & D for each bid item on the "Bid Sheet" of the workbook. I would then copy the 0MAX2RE template, name it as the item I just filled out in Column B on the "Bid Sheet" I then link the cost and markup from the new sheet I just copied and renamed to the "Bid Sheet". On the testworkbook, I have filled out the description and then I've also copied the worksheets and renamed them. I am trying to get a macro to copy "0MAX2RE" for every bid item on column B from the "Bid Sheet", then hyperlink the new sheet to the description on column b, link the cost from the copied worksheets to the bid sheet and link the markup from the newly copied sheet to the "Bid Sheet" The test workbook is what I'm looking to accomplish. I manually copied the 0MAX2RE, renamed then, and then linked to the bid sheet. I hope this is a better explanation. I am using this code now to copy sheets, but it doesn't do the linking. It's not pretty and I'm not a fan of the error handling, but it is what it is. Thank you again

    Please Login or Register  to view this content.
    I was trying to get the original code to work, since the cost cell is always one down and one to right of the "MARK-UP" Cell.
    Last edited by mdolinger; 03-26-2021 at 01:01 PM.

+ 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. Find cells, copy range with criteria and paste with offset
    By benfontein in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-13-2017, 03:25 AM
  2. [SOLVED] Use Offset and Variable to Copy and Paste Range in a different Worksheet
    By ChrisHook in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-01-2015, 03:44 PM
  3. [SOLVED] Vba : Find select offset copy and paste
    By Atik in forum Excel General
    Replies: 6
    Last Post: 12-21-2014, 11:38 AM
  4. [SOLVED] Find Cell in different worksheet, Offset and Paste in multiple cells
    By JRidge in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-29-2014, 06:09 PM
  5. Loop to find a cell, then copy offset paste
    By mr.alexander in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-29-2013, 08:48 AM
  6. [SOLVED] Find word, Offset, copy and paste data
    By Hood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2013, 09:50 AM
  7. Help with find, copy, and paste code using offset
    By mundellj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2011, 08:16 PM

Tags for this Thread

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