+ Reply to Thread
Results 1 to 16 of 16

Moving Records to the database with multiple rows

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Moving Records to the database with multiple rows

    Hi,

    I am looking for help in User Form kind of excel sheet, where the data is entered in multiple rows and columns needs to be moved to a database. In the database, the data has to be inserted at the bottom of the last previously entered row. Please help. sample sheet attached. Thanks in advance.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Moving Records to the database with multiple rows

    Any help ?

  3. #3
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: Moving Records to the database with multiple rows

    Where you need this data transfer? I mean with in sheet or other sheet.

    Thanks

    Thameem.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Moving Records to the database with multiple rows

    Give this a try:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    02-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Moving Records to the database with multiple rows

    In another sheet.
    Thanks,

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Moving Records to the database with multiple rows

    If in another sheet, change the destination in my code to the applicable sheet where I have "Sheet1". I assumed from your example that it was in the same sheet.

  7. #7
    Registered User
    Join Date
    02-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Moving Records to the database with multiple rows

    Thank you, Alan. It worked like a charm.

    However, I have one more problem. The inputs that formula derived, hence it copies the formula to other rows and i can't see the values as they are meant for that cell. I see all fields as #NUM. So how do I copy only the values and not formulas ?

    Thanks,

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Moving Records to the database with multiple rows

    Are you saying that you are putting formulas in the input cells A4:D7? I am confused by your request.

  9. #9
    Registered User
    Join Date
    02-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Moving Records to the database with multiple rows

    C4 to C7 is derived by formula in relative to A and B column inputs.

  10. #10
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: Moving Records to the database with multiple rows

    Use Mr. Alan's code and add .value below

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    02-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Moving Records to the database with multiple rows

    Thanks Thameem.

    But i get Run time error :1004 by doing so. Error - Copy method of Range class failed.

  12. #12
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Moving Records to the database with multiple rows

    Instead of calculating in C4:C7, I suggest you put the formula in your destination cells and not in the input cells.

  13. #13
    Registered User
    Join Date
    02-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Moving Records to the database with multiple rows

    Hi Alan,

    I don't need the formula in the destination.

    I have used the formula to list the servers based on the PRODUCT and COMPONENTS. So it list the servers, the I like to move to the destination just the values alone. currently, it is moving with formulas.

    Thanks,
    Ranga

  14. #14
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Moving Records to the database with multiple rows

    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  15. #15
    Registered User
    Join Date
    02-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Moving Records to the database with multiple rows

    Joseph,

    Your vba program worked well. Thanks a lot.

    Thank you Alan, Thameem for your quick responses.

    Regards,
    Ranga

  16. #16
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Moving Records to the database with multiple rows

    If that takes care of your original query, please select Thread Tools from the menu above and mark the thread as solved. Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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