Results 1 to 14 of 14

Copy a template table

Threaded View

  1. #1
    Registered User
    Join Date
    11-07-2019
    Location
    Lithuania
    MS-Off Ver
    Office 2013
    Posts
    52

    Copy a template table

    Hello everyone,

    The problem i have is this. I made an inventory registry, using some simple formulas and a macro that looks like this :
    Dim r As Range
       
        Set r = Target.Cells(1, 1)
       
        If Len(r.Value) = 0 Then Exit Sub
       
        If r.Column <> 21 Then Exit Sub
       
        r.Offset(-5, -20).Resize(15, 20).Copy r.Offset(0, -20)
    It works like this. When a code of the box is scanned in column "U", the previous table with r.offset is copied in adjacent cells of the scanned code and some cells are filled using certain parts of that code. The problem is that all of the U column cells are active and if the code is scanned in the wrong cell, the table copies badly.

    I was wondering if there would be a better way of registry?

    I was thinking about a "NEW BOX" button with
    Application.Inputbox
    in which the code would be scanned, then the last cell with a value
    End(xlup).Select
    would be found, the value entered nearby, and a table template from a new worksheet "Templates" would be copied in adjacent cells .

    Is something like this possible.
    Any tips, insights and help is really appreciated.
    P.S. table in attachments
    P.S.S cross-posted HERE, due to multiple available solutions. Just didn't want stick them all in one post.
    Attached Files Attached Files
    Last edited by baxius; 01-12-2020 at 05:04 PM. Reason: Added a Cross-post

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 06-26-2019, 02:47 AM
  2. Replies: 0
    Last Post: 06-25-2019, 12:04 PM
  3. Macro Request Pivot Table Value Copy to Template Sheet
    By ganeshinscribe in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-10-2014, 04:15 AM
  4. Copy various cells from an invoice template into a table
    By lisa1984 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-04-2013, 09:39 AM
  5. Replies: 3
    Last Post: 05-15-2013, 11:34 PM
  6. [SOLVED] Copy Excel Range with formats into new Doc from Template's table
    By scotta in forum Word Formatting & General
    Replies: 21
    Last Post: 09-05-2012, 12:59 PM
  7. Create a pivot table template/master copy?
    By Monique Rebanks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2010, 04:04 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