+ Reply to Thread
Results 1 to 10 of 10

Copy formula from one row to another

  1. #1
    Registered User
    Join Date
    06-14-2012
    Location
    California
    MS-Off Ver
    Office 365
    Posts
    56

    Copy formula from one row to another

    I have a bunch of formulas that run to about 6000 rows. Sometimes we will use all 6000, sometimes not. When sorting the data, it puts all the empty cells at the top and the ones with actual data after that. I need to create a macro that will only copy the formula to the next row, but only if data gets input in the cell above. By doing this, I can sort the rows with actual data properly. Thanks.

  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
    53,048

    Re: Copy formula from one row to another

    hav you considered using a ffilter to hide all the rows with blank entries?
    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
    06-14-2012
    Location
    California
    MS-Off Ver
    Office 365
    Posts
    56

    Re: Copy formula from one row to another

    I tried, but that did not work

  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
    53,048

    Re: Copy formula from one row to another

    maybe i can help to show you how, can you upload a sample?

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy formula from one row to another

    Please Login or Register  to view this content.
    Maybe try again, the added solution will work.

  6. #6
    Registered User
    Join Date
    06-14-2012
    Location
    California
    MS-Off Ver
    Office 365
    Posts
    56

    Re: Copy formula from one row to another

    Here is a sample sheet. The only thing I am trying to do is when I sort the data in the first sheet, I don;t want to sort the empty cells that have formulas. I appreciate your help.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy formula from one row to another

    With a filter on column F.

    The empty cells are gone.

    I marked the last row with the color red.

    I can't post the example because it is 4 mb!

    Filter on column F and click on empty cells. (everything without empty cells is selected en shown).

  8. #8
    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
    53,048

    Re: Copy formula from one row to another

    thx oelere

  9. #9
    Registered User
    Join Date
    06-14-2012
    Location
    California
    MS-Off Ver
    Office 365
    Posts
    56

    Re: Copy formula from one row to another

    Can I do the same thing for all columns?

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy formula from one row to another

    Yes, use the filter for every collumn.

+ 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