+ Reply to Thread
Results 1 to 7 of 7

Inputing & Collecting Data

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Inputing & Collecting Data

    Hey,

    I've just been asked to do a new Quality Control project for my boss. What I'm looking to do is be able to input the thickness values of our product in one worksheet, and have it recorded in another, as well as have the data separated by the model number

    The main problem I'm having is figuring out how to enter data in the 1 worksheet as a template, and have the data consecutively stored, one after the other

    Are there any functions that will allow me to do this?

    Thank you for your time,
    Bob
    Attached Files Attached Files
    Last edited by sighlent1; 12-30-2009 at 11:16 AM.

  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: Inputing & Collecting Data

    Things like this can't be done with functions, only by vba.

    I've written a little macro for you and installed it in the sheet. Just enter the values and press the button and it will transfer for you.
    Last edited by JBeaucaire; 12-18-2009 at 01:01 PM. Reason: sheet removed...see below for latest version
    _________________
    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
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Re: Inputing & Collecting Data

    Hey, that looks EXCELLENT. Thank you SOOOO much

    this isn't fully necessary, but by any chance, if its not too difficult, would you be able to record it without recording the boarders in the Model sheets?

    in the attachment, worksheets "Model A" & "Model B" is how i'd prefer it to look, and "Model C" is how it records.

    I'm sorry to be asking for this, but could you help me out with this?

    Thank you SOOOOO much
    Bob
    Attached Files Attached Files
    Last edited by sighlent1; 12-18-2009 at 09:47 AM. Reason: Forgot Attachment

  4. #4
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Re: Inputing & Collecting Data

    Please ignore this last post....i have something to add

  5. #5
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Re: Inputing & Collecting Data

    Hey, what you did look ABSOLUTELY GREAAAT!!!

    i thought that i'd be able to Edit the file and add things to it that i'd want for the company. But, with macros, either this can't be done, or i just simply don't know how to edit them

    if it's not too much to ask, would you be able to recreate the macro with this new information, but don't record the boarders in the worksheets?

    Thank you SOOO much, and I REALLLY appreciate your time
    Bob
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    236

    Re: Inputing & Collecting Data

    Ohhhh, me and my coworker figured out how to edit the macro

    Thank you soooo much for your help

    Happy Holidays
    Bob

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

    Re: Inputing & Collecting Data

    I've adjusted the macro so that it will now copy all the data down to however many categories you add in column E. Expand them as you wish and the macro will include them.

    Also borders are not copied now.

    Also, a Data validation list is used in F6 to insure the correct model # spellings are used since even a tiny misspelling like an unseen space would cause the macro to crash. Best to validate that cell.
    Option Explicit
    
    Sub TransferData()
    'JBeaucaire  (12/18/2009)
    Dim RNG As Range, ws As Worksheet, LR As Long
    Application.ScreenUpdating = False
    LR = Range("E" & Rows.Count).End(xlUp).Row
    Set RNG = Range("F5:F" & LR)
    
    If WorksheetFunction.CountA(RNG) < LR - 5 Then
        MsgBox "Please fill in all " & LR - 5 & " values"
        Exit Sub
    Else
        Set ws = Sheets("Model " & Range("F6"))
        RNG.Copy
        ws.Cells(5, Columns.Count).End(xlToLeft).Offset(0, 1).PasteSpecial xlPasteValuesAndNumberFormats
        RNG.ClearContents
        [F5].Select
    End If
    
    Application.ScreenUpdating = True
    End Sub
    ============
    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated. It is found across from the "time" in each of our posts.)
    Attached Files Attached Files

+ 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