Results 1 to 2 of 2
  1. #1
    NISMOJim is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2010
    Posts
    273

    Import Excel cells into Access

    Hello,
    I don't use macros too often, and maybe that isn't the best way to go, but I'm not sure how to do this...
    I receive an Excel spreadsheet each month that contains information that I want to import into an Access table. The spreadsheet contains what would be 11 records in the database. The information I want to save into the table is scattered in different cells, rather than being in consecutive cells, although the data is in the same cell each month. What I need to do, for example, is import cell A4 into table MyTable, field StartTime...Cell B7 into MyTable, field EndTime, etc. Then, create the next record, where it would import cell A8 into MyTable, field StartTime...Cell B11 into MyTable, field EndTime, etc.
    Can this be done using a macro, or maybe I could stumble my way through VBA with quite a bit of help?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    This will require VBA code (called macros in Excel but macros in Access are quite different). If you want the code in Access this will involve the code opening the workbook as a virtual object the code can manipulate. The code can reference specific cells and pull in the data to save into table records. This is rather advanced programming for a beginner but if you have any programming background you can probably work it out eventually. Lots of examples to learn from.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. vba load access query to specific excel cells
    By xopherira in forum Programming
    Replies: 8
    Last Post: 08-27-2015, 11:33 AM
  2. excel cells conditional formatting with access vba
    By trevor40 in forum Programming
    Replies: 2
    Last Post: 12-17-2014, 07:31 PM
  3. Import Specific cells from Excel based on selected file.
    By Only4Access in forum Programming
    Replies: 5
    Last Post: 02-29-2012, 02:32 AM
  4. exporting access report to specific excel cells
    By grgold14 in forum Import/Export Data
    Replies: 1
    Last Post: 02-07-2012, 04:38 PM
  5. Import Specific Cells from Excel to Access
    By Evocube in forum Import/Export Data
    Replies: 2
    Last Post: 01-12-2012, 10:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums