Results 1 to 4 of 4

Generating Macro to create multiple duplicate cells based on an input reference

Threaded View

  1. #1
    Registered User
    Join Date
    10-04-2013
    Location
    Ann Arbor, Michigan
    MS-Off Ver
    Excel 2011
    Posts
    2

    Generating Macro to create multiple duplicate cells based on an input reference

    Hi!
    I am new to excel and need help generating a macro that will save me several hours of inputing the data manually!

    I collected data on death rate of flies when exposed to toxins and recorded the number of dead flies over an hour in 5 minute intervals.
    I have a spreadsheet with 1000 rows. Each row represents a sample size of 10 flies and their death rate over the 12 recorded times (5 to 60 minutes). Instead of looking at death curves over the hour range, i now want to change my data to separate the 10 flies in each row to include the time of death for each individual fly in the sample. This means that i will need to generate 10 different "time to death" output numbers based on the survival data i currently have for each row. Here is an example of what i am trying to do:

    T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 <-----this indicated the time variable
    5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 <-----this is the value of each variable. For example T1 is 5 minutes.
    2, 2, 3, 4, 4, 4, 4, 5, 7, 7, 7, 10 <---these are the number of flies that were dead at the recorded times
    5, 5, 15, 20, 40, 45, 45, 60, 60, 60 <----these are the output values that i need for this ONE row.[/B]

    The last row clearly accounts for the time of death for all 10 flies in the sample size and separates them into individual samples. For example, at T1 (or 5 minutes) 2 flies were dead, so my output file should have two 5minute values out of the 10 because 2 different flies in the sample died within 5 minutes. I will then just need to transpose the values from horizontal to vertical to give me 10,000 rows with "time of death" values. Ah, that's a lot of flies!
    Any help will be greatly appreciated!
    thanks
    Attached Files Attached Files
    Last edited by Jomian; 10-05-2013 at 12:32 AM. Reason: added data attachment!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to create a template based on user input
    By redman742 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-27-2012, 10:59 PM
  2. Create mutiples Cells based on input number
    By perrierf in forum Excel General
    Replies: 3
    Last Post: 10-28-2011, 08:11 AM
  3. Create macro to fill multiple cells from input in one cell
    By codilaine in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2011, 03:56 AM
  4. reference to a range of cells as input for a macro
    By thosecars82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2009, 04:54 PM
  5. Generating dynamic charts based on the user input
    By shivan4u in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 02-13-2006, 08:43 AM

Tags for this Thread

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