+ Reply to Thread
Results 1 to 5 of 5

Making a "Database" In excel

  1. #1
    Registered User
    Join Date
    10-07-2011
    Location
    USA, PA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Making a "Database" In excel

    Hello, I'm currently working on a workbook in Microsoft excel, and i could use some help making it add information automatically.

    I know that excel is not suppose to be used as a database, but it is important that I keep everything in an excel file.

    What I am doing:

    I am currently making a combination of a invoice, a packing slip, and a database all in one workbook.

    The invoice worksheet uses a VLOOKUP table to fill in other cells based off of the PART#. It also requires the quantity to complete the PRODUCT(multiply) formula. This sheet can hold 20 entries.

    The Packing slip worksheet takes information from the invoice worksheet and places it appropriately. It also requires manual input for the PO# and Invoice#. This sheet can also hold 20 entries.


    What I am having problems with:

    The section I am having a problem with is the Database section.

    What I want it to do, is to take the information from the Invoice worksheet and Packing slip worksheet and compile it on one row for each part that was entered.

    What I want to do.

    (See attached workbook)

    If you look at the Sales Database worksheet, you'll see 8 rows, all with a different header. If you look at the For database worksheet, you'll see the same 8 rows, only the twenty cells below it have links to the information which correspond with the row.

    What we have been doing is taking the information in the For Database worksheet and copy > Paste special > Values into the Sales Database worksheet

    I have been searching the internet for a way to make it so that the information that we have been copy and pasting into the database worksheet, automatically forward to the database worksheet on the bottom row (of last entered information, not the bottom of the worksheet)

    I found out that this kind of thing is possible using VBA codes. but I have very little understanding of programing.

    This code is my only lead onto getting something like this to work. But I need it to operate on Worksheet_Calculate instead of Worksheet_Change (becouse i have feilds that don't require any manual input, and worksheet_change seems to only update the row if manual data is inputted.

    Please Login or Register  to view this content.
    This code may not work for what i need because i need it to check all twenty input fields, and exclude them if there is no information imputed.

    Again, my knowledge of programing is extremely limited (I edited the above code to get rid of a feature i didn't want, but i got error messages, so i left the if/then statements alone and changed the command it does to something i did want. You may notice the redundancy with the target.address.)

    I attached a workbook with filler information that uses the exact format as my actual workbook.

    Steps to show "issue"
    1) Open invoice worksheet (attached)
    2) Type 200 into the first row under Quantity
    3) Type 2 into the first row under Part #
    4) Type 200 into the second row under quantity
    5) Type 10 into the second row under Part#
    6) Go to the Packing List worksheet
    7) Type 201201 into the first row under PO#
    8) Type 500 into the first row under Invoice#
    9) Type 201205 into the second row under PO#

    ----The following steps are the steps i would like to have be automated---
    10) Click the For Database worksheet
    11) Highlight all of the data. Do not highlight the headers.
    12) Copy
    13) Go to the Sales Database worksheet
    14) click the upper left most cell (A2 in this case).
    15) Paste Special
    16) Values.
    17) OK

    If anyone could check it out and let me know what i need to do to accomplish this, or fill it into my attached workbook, it would be greatly appreciated! (any suggestions for improvement would be great as well, I don't use excel often.)

    Thanks in advance!

    Higoten.
    Attached Files Attached Files
    Last edited by Higoten; 10-07-2011 at 09:30 PM.

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

    Re: Making a "Database" In excel

    I have been searching the internet for a way to make it so that the information that we have been copy and pasting into the database worksheet, automatically forward to the database worksheet on the bottom row (of last entered information, not the bottom of the worksheet)
    Please Login or Register  to view this content.
    I would recommend using that code on a specific command from you. Until you clear the entries in the first two sheets, it's possible those codes could be sent to the Sales Database multiple times, right? Best keep control of that.
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    10-07-2011
    Location
    USA, PA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Making a "Database" In excel

    Hi JB. Thank you for the speedy reply.

    I just tried out the macro you gave me and i do agree it needs to be manually activated so that it doesn't duplicate.

    But, it seems like its copying and pasting the white space too, Because we can have up to 20 parts on an invoice, but its not always 20, it might be 2, or 5, or 16, etc.

    Can you think of any way around this white space so that it doesn't place it in the Sales database?

    Also, is the only way to run a macro in excel 2003 by going to Tools> Marcos > Marcos... > and run?

    I also named the macro "Database"

    Thanks for your help!
    Higoten

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

    Re: Making a "Database" In excel

    You can go to Tools > Macro > Macros > click once on the macro > OPTIONS and assign the macro a keyboard shortcut, then run it that way.

    More:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-07-2011
    Location
    USA, PA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Making a "Database" In excel

    Thank you JB!

    This macro works extremely well and does exactly what i want it to do!

    I can now hide and protect the For Database worksheet so that people don't mess with it on accident.

    My friend referred me to you guys saying that this forms was one of the best places he comes for help with Microsoft Office. I'll be sure to send anyone i know having an issue over here.

    Thanks again, Ill mark this topic as solved.
    Higoten

+ 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