+ Reply to Thread
Results 1 to 4 of 4

Fill down two columns based on previous value until new value occurs

  1. #1
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Fill down two columns based on previous value until new value occurs

    Hi there,

    I would to have a quicker way of filling down two columns with values based on previous cell value.

    Please see the attached.

    In the worksheet1, you see number 3, 6 under col A and "AA" and "BB" under col F.

    What I want:

    I want to have excel automatically fill down both 2 columns with specified values. So, if row 3 to row 8 are all under 3 in col A, then I want A3 to A8 = 3, so A10 to A 21 = 6, etc.

    Col F is the same thing.

    Because the list is rather big, I don't want to manually type them in... only need to fill down on col A and F..

    Any ideas?

    Thanks very much
    Attached Files Attached Files
    Last edited by Lifeseeker; 03-01-2012 at 09:10 AM.

  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,946

    Re: Fill down two columns based on previous value until new value occurs

    Add a helper column between A & B and add this formula...

    =IF(A2="",B1,A2)

    copy this down ad far as yuou need. also copy the same formula to (the new) H column. This should give you what you need, you can hide thes columns if needed
    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
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Fill down two columns based on previous value until new value occurs

    wow nice...

    thank you. I have never thought about that! Easier than a macro even...

  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,946

    Re: Fill down two columns based on previous value until new value occurs

    Glad to help, please mark this as solved

+ 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