+ Reply to Thread
Results 1 to 5 of 5

Organizing Data in Response to User Input

  1. #1
    fitzcollings@gmail.com
    Guest

    Organizing Data in Response to User Input

    I'm very new to Excel VBA and cannot figure out how to organize data
    automatically, based on user input. For example, I have a large amount
    of data from a piece of biomedical equipment. We analyze about 45
    samples in duplicate with this equipment and the data comes out
    organized by row. Ie. sample 1: 1.25mm, sample 1: 1.20mm. There are
    several groups of samples that are analyzed, and the number of samples
    in each group varies. I would like to be able to organize the data by
    group automatically, for example by coloring each group region or by
    selecting and moving each group, following a user's input to the
    question "how many samples are there in group X?". I'd like to be able
    to repeat this for Groups Y, Z, etc. I've been trying to figure out
    how to do this for several days now with no success. Any ideas?


  2. #2
    Tom Ogilvy
    Guest

    Re: Organizing Data in Response to User Input

    Are groups separated by a blank row and column. If so, this might give you
    a start:

    Sub demo()
    set rng = Activesheet.UsedRange
    set rng = rng.specialCells(xlConstants)
    for each ar in rng.Areas
    ar.Select
    msgbox "Hit key to continue"
    Next
    End Sub


    --
    Regards,
    Tom Ogilvy


    <fitzcollings@gmail.com> wrote in message
    news:1125589651.447982.22270@o13g2000cwo.googlegroups.com...
    > I'm very new to Excel VBA and cannot figure out how to organize data
    > automatically, based on user input. For example, I have a large amount
    > of data from a piece of biomedical equipment. We analyze about 45
    > samples in duplicate with this equipment and the data comes out
    > organized by row. Ie. sample 1: 1.25mm, sample 1: 1.20mm. There are
    > several groups of samples that are analyzed, and the number of samples
    > in each group varies. I would like to be able to organize the data by
    > group automatically, for example by coloring each group region or by
    > selecting and moving each group, following a user's input to the
    > question "how many samples are there in group X?". I'd like to be able
    > to repeat this for Groups Y, Z, etc. I've been trying to figure out
    > how to do this for several days now with no success. Any ideas?
    >




  3. #3
    fitzcollings@gmail.com
    Guest

    Re: Organizing Data in Response to User Input

    Hi Tom,

    Thanks so much for your quick reply. Groups are not separated by a
    blank row; rather samples are arranged consecutively in rows. Groups
    are denoted by several letters (HR, NV), and individual samples are
    indicated by a number (1,2,3), so that each piece of data is identified
    by (HR1, NV1, etc). The data for each sample appears in the column to
    the right of this cell. What I really need, I think, is a way to first
    select groups of samples based on their letter designation and then
    transfer them to a different sheet by group, leaving four blank rows
    between each group for future data analysis (averages, stdevs, etc). I
    hope this clarifies what I'm trying to do. Thanks again for your help!


  4. #4
    Tom Ogilvy
    Guest

    Re: Organizing Data in Response to User Input

    Just click in your data and apply Data=>filter=>Autofilter

    If you can't select you group directly from the dropdown, then in the
    dropdown, select custom and use something like Begins with HR

    If you want to copy to separate sheets, Ron de Bruin has code that uses the
    autofilter to this:


    http://www.rondebruin.nl/copy5.htm

    --
    Regards,
    Tom Ogilvy


    <fitzcollings@gmail.com> wrote in message
    news:1125592147.248020.28870@g44g2000cwa.googlegroups.com...
    > Hi Tom,
    >
    > Thanks so much for your quick reply. Groups are not separated by a
    > blank row; rather samples are arranged consecutively in rows. Groups
    > are denoted by several letters (HR, NV), and individual samples are
    > indicated by a number (1,2,3), so that each piece of data is identified
    > by (HR1, NV1, etc). The data for each sample appears in the column to
    > the right of this cell. What I really need, I think, is a way to first
    > select groups of samples based on their letter designation and then
    > transfer them to a different sheet by group, leaving four blank rows
    > between each group for future data analysis (averages, stdevs, etc). I
    > hope this clarifies what I'm trying to do. Thanks again for your help!
    >




  5. #5
    fitzcollings@gmail.com
    Guest

    Re: Organizing Data in Response to User Input

    Thanks Tom, I'll give it a whirl.


+ 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