+ Reply to Thread
Results 1 to 7 of 7

copy from a cell in one spreadsheet to another only if there is not a formula.

  1. #1
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    copy from a cell in one spreadsheet to another only if there is not a formula.

    I am attempting to copy a column of cells but only if they don't to have a formula in them if they do I want to skip to the next cell. My code fail when I try to set the cell to do a .HasFormula

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy from a cell in one spreadsheet to another only if there is not a formula.

    Try this line

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: copy from a cell in one spreadsheet to another only if there is not a formula.

    it fails here
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy from a cell in one spreadsheet to another only if there is not a formula.

    Turtleman,
    I am not surprised it has failed. The code appears more complicated than it should be, assuming you are working on the same book. I suspect, you are looping though Column A and testing the cells if they have formulaa. If this is the case, the code could be simplified.

  5. #5
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: copy from a cell in one spreadsheet to another only if there is not a formula.

    Nope 2 different books. If it was one book it would be easy.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy from a cell in one spreadsheet to another only if there is not a formula.

    I think you have range names in your sheets, but this will give you a good start

    Please Login or Register  to view this content.
    Last edited by AB33; 03-22-2013 at 03:53 PM.

  7. #7
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: copy from a cell in one spreadsheet to another only if there is not a formula.

    Thanks I will give it a try.

+ 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