+ Reply to Thread
Results 1 to 10 of 10

Userform to Export Certain Data

  1. #1
    Registered User
    Join Date
    07-17-2007
    Posts
    18

    Lightbulb Userform to Export Certain Data

    Hi All

    Can anyone help?

    Im new to userforms but i think this is the best way to approach this?....

    I have a spreadsheet which has data dumped into it on a daily basis. The key feature of this spreadsheet is the column containing a week no (1-52)

    Because of the amount of data being stored each week What I would like to do is create a user form where the user could select a Week No from a dropdown list, or type it into an input box and then click a command button which would send all the data for the required week into a seperate sheet.

    Is this possible? If so could you possibly help point me in the right direction?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello RicRec,

    Will the data on the new sheet be in a single column also?

    Thanks,
    Leith Ross

  3. #3
    Registered User
    Join Date
    07-17-2007
    Posts
    18
    Hi Leith

    Well the spreadsheet data is actually formed of 5 columns, i was hoping that the column containing the week no could be used in a way similar to a vlookup if that makes sense?

    So by entering or selecting say week number "42" all the data with week no "42" in the relevant column would be sent across to the new sheet.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Place a combobox and a commandbutton onto a UserForm. Then use this code

    Load the ComboBox with week numbers

    Please Login or Register  to view this content.
    In the commandbutton this code will copy the weekly data, week numbers are in Column A

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello RecRic,

    Could you post your workbook so I can better understand what data is where?

    Thanks,
    Leith Ross

  6. #6
    Registered User
    Join Date
    07-17-2007
    Posts
    18
    Thanks for that Roy

    I will post the spreadsheet in the morning Leith as its on my other laptop at the moment

    Roy i will let you know how i get on!

    Thanks guys

  7. #7
    Registered User
    Join Date
    07-17-2007
    Posts
    18
    Hi Rob/Leith

    Rob that code you provided worked a treat, the week number wasnt in Column A but i managed to change the code easily.

    Just one quick follow up, if you dont mind, if i wanted have a list in the combobox of say names instead of a number range what would the code look like

    i.e

    For i = 1 To 52 (As it currently is) would change to something like For i = North,South,East,West ??

    Thanks again chaps

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You really should start a new Thread, but to load names like that you would use an array

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-17-2007
    Posts
    18
    Thanks Very Much Rob

    Have a good xmas :-)

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    My name is Roy, but thanks for the feedback.

+ 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