+ Reply to Thread
Results 1 to 6 of 6

Macro to copy and paste selected cell to a table.

  1. #1
    Forum Contributor
    Join Date
    03-04-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    130

    Macro to copy and paste selected cell to a table.

    Hi guys,

    Id be grateful for some help with this one.

    I have made a sheet to speed up inputting items from a database to a quotation sheet.

    Problem is the search works well the selecting of items not so well.

    I'm trying to replace the tick boxes with a button which will copy the contents of the search in the cell on the left into the table and fill from top to bottom.

    Also for a bit of added flair I was wondering if its possible to add a pop up box to ask for the quantity of the item required and add that to the cell right of the item selected.

    Thanks for looking,

    Adam

    quote builder.xlsx
    Last edited by JohnDoh; 03-24-2013 at 06:25 AM.

  2. #2
    Forum Contributor
    Join Date
    03-04-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Macro to copy and paste selected cell to a table.

    If its easier maybe forget the pop up?

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

    Re: Macro to copy and paste selected cell to a table.

    Adam,
    There is no code on the attached. You have also not explained what are trying to do. Please explain, what and where are you searching for and what do you want to do when search is found?

  4. #4
    Forum Contributor
    Join Date
    03-04-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Macro to copy and paste selected cell to a table.

    Sorry if my description was off, you're right of course there is no code.

    What I am trying to achieve is to find a suitable macro to copy and paste the text contents of the selected search result into the table on the right, essentially the same result as clicking the tick box but the problem is that unless I keep the box ticked I cant perform another search without wiping out the contents of the table. .

    Maybe if I describe the chain of events I'm trying to achieve.

    When a word is entered in the search box (This bit works) at the top of the page the top 25 results are displayed In column D, the user then clicks the button labelled "select" (This where the macro is required) the text adjacent to the button is then copied into the table to the right of the search results and a pop up box appears which asks for a numerical quantity to be selected, the result of this is then copied in the quantity column of the table.

    I hope this makes more sense and thank you for your reply it is much appreciated.

  5. #5
    Forum Contributor
    Join Date
    03-04-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Macro to copy and paste selected cell to a table.

    Does this make sense?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to copy and paste selected cell to a table.

    Hello Adam,

    The following macro has been added to the attached workbook. The Check Boxes have been removed and all the "Select" buttons call this macro to paste the description into the table.

    Module1 Code
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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