+ Reply to Thread
Results 1 to 6 of 6

Copy and Paste Cells contain formula only

  1. #1
    Registered User
    Join Date
    06-28-2022
    Location
    KSA
    MS-Off Ver
    Microsoft Office Professional Plus 2019
    Posts
    40

    Copy and Paste Cells contain formula only

    Hello
    I need to minimize the Code, i have some cells having Formulas and some Have Validations and Some Having text,
    I need a code to copy all the range but:
    paste only formulas in the cells having formulas
    Paste Validations in the Cells Having Validation
    Skip the Blank and the Cells having text donot copy.

    I am already using the following code its working but very long so the modifications is very difficult specially there are modifications every day so is there any way other than mentioned each cell.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Mhabashy; 10-23-2022 at 03:39 AM.

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Copy and Paste Cells contain formula only

    Hi Mhabashy,

    Can you post a sample of your file to see how to best utilize the data to copy relevant cells as I don't see a clear pattern from your code

  3. #3
    Registered User
    Join Date
    06-28-2022
    Location
    KSA
    MS-Off Ver
    Microsoft Office Professional Plus 2019
    Posts
    40

    Re: Copy and Paste Cells contain formula only

    I post a sample file , the formulas and validation lists is available at row number 10, every day i am changing this formulas and adding formula in some cells and removing from some, so to copy this in all the next rows without changing some cells i need to change the Macro cells references every time, so if there is any way in macro to detect if the cell is blank so skip it, if formula so paste formula only, if validation list so paste the validation list, without mentioned every address manual.

    i hope its clear

    thanks for your support

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Copy and Paste Cells contain formula only

    Hi Mhabashy,

    Try below code ... It basically checks every cell in row #10 & if it has a formula, copy it from row #14 until last row & same thing if the cell has a validation
    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  5. #5
    Registered User
    Join Date
    06-28-2022
    Location
    KSA
    MS-Off Ver
    Microsoft Office Professional Plus 2019
    Posts
    40

    Re: Copy and Paste Cells contain formula only

    Thank you very much Mr. nankw83

    I am so fortunate that you read my article
    Your reply has saved a lot of work

    thank you

  6. #6
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Copy and Paste Cells contain formula only

    Happy to help & thanks for the Rep+

    If that takes care of your question, please mark this thread as [SOLVED] from the Thread Tools above your first post

+ 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. Copy Paste non-blank cells which contain formula
    By AdiK in forum Excel General
    Replies: 5
    Last Post: 03-10-2017, 05:06 PM
  2. Replies: 11
    Last Post: 03-03-2016, 12:26 AM
  3. Replies: 8
    Last Post: 07-08-2013, 06:03 AM
  4. Formula to copy and paste data in cells to other cells based on values
    By haleakala17 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-11-2012, 08:45 AM
  5. [SOLVED] Copy/Paste how to avoid the copy of formula cells w/o calc values
    By Dennis in forum Excel General
    Replies: 10
    Last Post: 03-02-2006, 06:50 PM
  6. [SOLVED] How to copy and paste same formula in multiple cells?
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 12:05 PM
  7. [SOLVED] How to copy and paste same formula in multiple cells?
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 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