+ Reply to Thread
Results 1 to 4 of 4

Allowing paste but not over specific cells/formulas

  1. #1
    Registered User
    Join Date
    02-20-2019
    Location
    London
    MS-Off Ver
    2013
    Posts
    6

    Allowing paste but not over specific cells/formulas

    Hi,

    I have created a spreadsheet A with a number of headings and within this spreadsheet I have created some formulas (vlookup & concatenate etc.).

    The base data is in spreadsheet B that is designed to replicate the layout in spreadsheet A. Within spreadsheet B some columns have been left blank where the formulas are located in spreadsheet A.

    I need the base data in spreadsheet B copied into spreadsheet A but without overwriting the formulas that have been created. The formulas are required for bringing in information from different sheets within spreadsheet A.

    Therefore, I need to paste data from spreadsheet B into A without overwriting the formulas in the required cells – Is this possible?

    Thanks in advance
    Ickle

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Allowing paste but not over specific cells/formulas

    Hi, welcome to the forum.
    Without the actual sheets it's difficult to tell.
    You would probably need to write some code that reads each cell in the source and paste it only into cells that do not contain formulas.
    There is no way to just say paste and skip formula cells.
    unless the layout is identical so that the cells to be copied are always non-equal to the formula cells in the target then you could use SpecialCells(XlCellTypeConstants) to copy and paste
    I suggest you lookup[ u(Google) using SpecialCells
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    02-20-2019
    Location
    London
    MS-Off Ver
    2013
    Posts
    6

    Re: Allowing paste but not over specific cells/formulas

    Thanks Keebellah.

    I will take a look at SpecialCells

    Both spreadsheets will have exactly the same layout its just that the information will be being populated in both. Two different teams will be populating their specific data and then B will be pasted into A to ensure that we have one fully populated spreadsheet. Therefore, B cannot over copy the information already populated in A.

    Ickle

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Allowing paste but not over specific cells/formulas

    Hi Ickle, if the layout is the same and the formulas are in the same cells then using the special cells and the constants type will only take those cells that do NOT have formulas.
    But if you also say that two different users will use this then you will have to write the vba code so that only the empty cells will be filled and not overwrite existing data.
    This will take some thinking and writing code that will answer to specific conditions.
    But that is something only you can decide since we don't have anything to go on.

+ 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. Allowing manual entering in cells with formulas
    By cwelsh in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-30-2018, 11:51 AM
  2. [SOLVED] Allowing Users to Input Data into Cells Containing Formulas without Deleting the Formula
    By MayBTheresHope in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 10-29-2018, 07:43 PM
  3. Replies: 6
    Last Post: 10-12-2016, 09:34 AM
  4. Generating formulas into specific cells, based on various formulas
    By S_O_A_L in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2016, 08:45 PM
  5. Copy and Paste Values for cells containing specific formulas
    By SAFC in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-17-2015, 08:23 AM
  6. Replies: 5
    Last Post: 11-03-2012, 05:10 PM
  7. Replies: 5
    Last Post: 01-04-2005, 01:06 PM

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