+ Reply to Thread
Results 1 to 4 of 4

How do you auto-fill multiple values multiple times in a single column?

  1. #1
    Registered User
    Join Date
    10-17-2014
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    3

    How do you auto-fill multiple values multiple times in a single column?

    I am working with an excel file that has approximately 44300 records for 13 variables. These data represent fecundity estimates for fish caught during sampling. The first variable, "number", indicates the specific number assigned to each specific fish. The second variable, "Egg", indicates the number of eggs measured during analysis. So variable A (Number) will be repeated in column A alongside the count for variable B (Egg). The number off eggs differs for every fish, so the number of times the alphanumeric will be repeated varies for each fish as well. It could go from rows 1 -130, for example. Or rows 28765-28991 etc... For every egg value of 1, I have the corresponding fish number in column A already, but it does not repeat. See the attached images for clarification if I am not explaining this well enough.

    The issue I am having is that I do not currently have "number" repeated alongside the egg counts. If I attempt this by hand, copy-pasting each value into their own range of cells, it will take a very long time as there are approximately 44000 rows in this file.

    Does anybody here know a way to autofill a single column in excel, but have that autofill function change every time a new number appears. IE Fill "15-C" for rows 1-154, but then change to the next number at row 155 until a new value appears in that column. Repeat until the end of the sheet.

    EDIT

    Find the file I am working with here: https://dl.dropboxusercontent.com/u/.../combined.xlsx

    I am simply trying to complete column A in the pattern you see for the first three fish (15-C, 30-C, 32-B).

    EDIT

    I solved this issue using the methods found here: http://stackoverflow.com/questions/1...ill-using-that

    I realize this may have been a no-brainer to some, but it was giving me trouble. Hope this helps someone in the future.
    Attached Images Attached Images
    Last edited by D_N_W; 08-09-2015 at 06:43 PM. Reason: Solved

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: How do you auto-fill multiple values multiple times in a single column?

    Perhaps something like this?

    A
    B
    2
    15-c
    1
    3
    15-c
    2
    4
    15-c
    3
    5
    15-c
    4
    6
    15-c
    5
    7
    15-c
    6
    8
    15-c
    7
    9
    15-c
    8
    10
    30-c
    1

    B2=IF(A2="","",IF(A2=A1,B1+1,1))
    copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-17-2014
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    3

    Re: How do you auto-fill multiple values multiple times in a single column?

    Thank you for the reply. I was not able to make your solution work. When copied into cell B2, the values in colum B simply disappeared as column A is empty.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: How do you auto-fill multiple values multiple times in a single column?

    I wrote that formula to return "nothing" if the respective A cell was empty (so you didnt have a bunch of numbers running down the table. As soon as you enter data into A, it should populate

    It would appear that you have solved this, but for future reference (and now too, if you want), pleasae upload your file to the forum - not all members are able (or willing) to access file-hosting sites

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] auto fill with one column and multiple unique rows.
    By plague5050 in forum Excel General
    Replies: 5
    Last Post: 04-30-2013, 02:29 PM
  2. Replies: 0
    Last Post: 09-26-2012, 10:33 AM
  3. Multiple column values on single line chart
    By Loneswimmer in forum Excel General
    Replies: 1
    Last Post: 06-26-2012, 03:45 AM
  4. [SOLVED] COUNTIFS: Using { } to search for multiple values in single column
    By jeversf in forum Excel General
    Replies: 3
    Last Post: 04-03-2012, 07:53 AM
  5. Replies: 6
    Last Post: 03-26-2012, 05:12 PM
  6. Replies: 0
    Last Post: 03-21-2012, 10:18 AM
  7. Auto filter and fill values in multiple columns
    By learningkid0808 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2011, 06:52 AM
  8. Auto fill multiple cells depending on single cell value
    By henrat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-28-2005, 01:10 AM

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