+ Reply to Thread
Results 1 to 6 of 6

Transfer data from Database sheet back to Input sheet

  1. #1
    Forum Contributor
    Join Date
    07-13-2014
    Location
    Three Rivers
    MS-Off Ver
    365
    Posts
    127

    Transfer data from Database sheet back to Input sheet

    Hi,

    My first time posting on the forum!
    I hope someone can help, I am looking for VBA code to transfer data (using a button) from a "Database" sheet back to the "Input" sheet without having to populate the Input sheet manually for re-calculation.

    1. In the attached example workbook I have the VBA code that can send the data from the "Input" sheet to the "DB" sheet when you press "Save to Database" button, but now I need a code that can work in the reverse and send the data back from a specific row in the "DB" sheet by selecting a cell in column A to "activate" the row data and then press the "Load Inputs" button to send the specific rows data back to the "Input" sheet and re-populate the corresponding cells.

    2. After the transfer back to the "input" sheet has been successful the code should then delete that specific row in the "DB" sheet as it will be re-saved to the DB after the inputs have been changed/checked to prevent any duplicate data information
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Transfer data from Database sheet back to Input sheet

    Check it out, to get the db cells to input cells
    Please Login or Register  to view this content.
    Last edited by davesexcel; 02-21-2015 at 11:54 AM.

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Transfer data from Database sheet back to Input sheet

    This is a partial solution . Since the database is in "Table form" the deletion part swipes all the rows below it too...
    You could convert the database into a flat table.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-13-2014
    Location
    Three Rivers
    MS-Off Ver
    365
    Posts
    127

    Re: Transfer data from Database sheet back to Input sheet

    Thanks, it does work to get the DB cells to Input sheet cells however it should not transfer the data in the grey cells as these are formulas in Input sheet. It should just transfer the data from columns B, C, E, F in the selected row

  5. #5
    Forum Contributor
    Join Date
    07-13-2014
    Location
    Three Rivers
    MS-Off Ver
    365
    Posts
    127

    Re: Transfer data from Database sheet back to Input sheet

    @ rcm

    thanx, please advise how to link to button "Load Inputs" in DB sheet

    I ran the macro, but had the following problems:
    1. line Sheets("Input").Cells(10, 3) = Sheets("DB").Cells(Target.Row, 5) of the code populated incorrectly. it placed the data in C8 instead of C10 on the Input sheet.
    2. did not delete any of the rows (this is not important and as you said it might delete all rows below the selected row - this would not work for me having other data deleted as well)

  6. #6
    Forum Contributor
    Join Date
    07-13-2014
    Location
    Three Rivers
    MS-Off Ver
    365
    Posts
    127

    Re: Transfer data from Database sheet back to Input sheet

    @rcm please ignore my previous post with the errors I got, seems I had some glitch that did not make it work right!

    I later sat again and tried your code again and it worked great!

    In your code how would you link the code to only activate when the "Load Inputs" button in DB sheet is pressed?

+ 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. [SOLVED] Issue regarding recorded Macro to transfer data from Input sheet to Storage sheet
    By Hirad001 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-29-2015, 04:26 PM
  2. Transfer data from input sheet to data sheet by using command button
    By vinh1985 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2014, 12:17 AM
  3. How to transfer data from a daily input sheet to a separate monthly total sheet
    By Jcooper71 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2014, 02:37 PM
  4. Transfer cell value from sheet to sheet based on user input (SOLVED)
    By Terrydorset in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-18-2013, 01:28 PM
  5. Focus back to the Excel Sheet I started on after the Database Updates on a sheet.
    By ca1358 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-21-2011, 11:44 AM

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