+ Reply to Thread
Results 1 to 10 of 10

Copy and paste values

  1. #1
    Registered User
    Join Date
    10-09-2011
    Location
    ashbourne
    MS-Off Ver
    Excel 2003
    Posts
    14

    Copy and paste values

    I need to get a macro that will copy data into specified cells within a row.

    SSA will have a value in C4 that will match one of the values in column A in SSB, When the macro runs I would like it to replace the data in various cells from SSA and pplace them in the row where C4 matches the cell in column A, then I want it to select the entire row and copy and paste values as the row has some formulas in that I would no longer want in there.

    Hopefully that made sense and you guys will be able to help

  2. #2
    Registered User
    Join Date
    10-09-2011
    Location
    ashbourne
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: macro to copy and paste values

    anyone help me with this one ?

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: macro to copy and paste values

    Please attach a sample workbook as its not easy to understand your problem without it.

  4. #4
    Registered User
    Join Date
    10-09-2011
    Location
    ashbourne
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: macro to copy and paste values

    in the attached, sheet 1 would be the job tracker and sheet 2 would be the individual job sheet.

    IRL these are in seperate workbooks but for ease of purpose here they are in the same file.
    Some of the blank columns in my real tracker sheet have vlookups in them to the individual job sheets, some are just blank.

    I want a macro to fill in the blank columns based on the booking reference and then copy the whole row and paste values (to get rid of the vlookups)

    The macro would be stored in the individual sheet and each individual sheet has a different file name so swapping sheets must use a reference such as activate.thisworkbook, rather than an absolute filename

    Does this make any more sense ?


    NOTE: the information in my real job sheet is not in row format as it appears here it is in various different cells and columns.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-09-2011
    Location
    ashbourne
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: macro to copy and paste values

    still noone ?

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: macro to copy and paste values

    Why would you need a macro? What's wrong with VLOOKUP? Just set up a query sheet that populates when required

    Adding individual sheets is a bad idea, you will just end up with so many sheets that you won;t be able to track them
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    10-09-2011
    Location
    ashbourne
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: macro to copy and paste values

    I want to do it this way as i am probably going to end up with 1000s of job queries with 4 or 5 vlookups per row, If I have to open a spreadsheet up with 10,000 vlookups in it, it will just lock excel up.

    I also need this macro to copy and paste values to get rid of the vlookups.
    I will end up with 1000s of seperate sheets but I am quite happy with this as they will all by hyperlinked from the main job tracker.

    Tahnks
    James

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: macro to copy and paste values

    Will each job sheet be a separate workbook? Isnt that too many workbooks to handle? It will be easier if all the job sheet details are in one file, isnt it? If one sheet runs out, you can use the other.

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: macro to copy and paste values

    You are creating a monster that will be difficult to work with. A databse in Excel or Access would be the best way to do this

  10. #10
    Registered User
    Join Date
    10-09-2011
    Location
    ashbourne
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: macro to copy and paste values

    essentialy a database IS what I am creating.

    Yes, each job will have a seperate workbook and linked from the main(database) spreadsheet via a hyperlink.

    Column A contains the booking reference which is how I would refer to jobs(click on the hyperlink opens up the workbook for that job) whilst the job is still live a lot of the cells in that row would have vlookups in them etc to get the job status and various information off the seperate job workbooks. Then once the job is closed off I run a macro from the seperate worksheet that does a copy and paste values, and the way it will know which row to update would be the booking reference which is also stored in the seperate workbook as well as column A of the "database"

    If I left the vlookups *live* after a few hundred jobs have been completed i would imagine this "database" workbook would be horrendous to work with.

    Ta
    James
    Last edited by no3ntry; 10-12-2011 at 05:49 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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