+ Reply to Thread
Results 1 to 7 of 7

Macro Removes Formula

  1. #1
    Registered User
    Join Date
    09-25-2006
    Location
    North West, UK
    MS-Off Ver
    2010
    Posts
    73

    Macro Removes Formula

    Hi

    Someone kindly wrote this macro for me a good while ago. It has served me well to date

    In essence, this macro looks at column A, and at every instance of a value
    it either
    creates a new sheet within the workbook, names it, the copies the entire row
    OR if there is a sheet already just copies the entire row

    Please Login or Register  to view this content.
    However something in the code is copying just the values in the cell to the new sheet, and I need it to retain any formula

    Any suggestions?

    Thanks
    Last edited by Althas; 11-21-2008 at 10:26 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    The use of advanced filter copying to another range is removing the formula.

    So you need to filter in line and the copy and paste visible cells.

    Will the copied cells formula work when moved to another location?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-25-2006
    Location
    North West, UK
    MS-Off Ver
    2010
    Posts
    73
    Hi Andy

    Sorry I am a bit of a dunce at times (a lot of times ) in VBA, I know the very basics but that is about all at the moment, so I do not really understand what your reply means (except the bit about the command causing the problems)

    Sorry (but I am forever learning)

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    First off, if you copy a record with formula to another location will the formula still make sense and return the correct/same information?

    If so can you post a set of sample data.

  5. #5
    Registered User
    Join Date
    09-25-2006
    Location
    North West, UK
    MS-Off Ver
    2010
    Posts
    73
    Thanks Andy, sorry again

    Yes if I copy/paste the formulas remain intact and return the value they should do

    Here is a small unsorted sample with all formula in and the macro attached

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    try this revision

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-25-2006
    Location
    North West, UK
    MS-Off Ver
    2010
    Posts
    73
    Andy, you are a genius, thank you so much


+ 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