+ Reply to Thread
Results 1 to 7 of 7

error message when someone does not paste into 2 cells

  1. #1
    Registered User
    Join Date
    12-15-2011
    Location
    Dallas texas
    MS-Off Ver
    Excel 2010
    Posts
    45

    error message when someone does not paste into 2 cells

    Hi all-

    Is there a way to pop up an error message if someone does not paste into 2 cells at a time?

    The problem is that I do not want users to be able to paste a part number (Column E) without the description (Column F), if they do only one (E or F) I want an error message to appear.

    Thanks for the help.

    -Mike

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,830

    Re: error message when someone does not paste into 2 cells

    Hi Mike. You cold loop through the part numbers in column E and use 'Offset' to see if the corresponding cell in column F is empty. If it is empty, you can have a message box pop up with a warning. If you need help with this, post a copy of your file with a detailed description of what you would like to do.

  3. #3
    Forum Contributor
    Join Date
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Re: error message when someone does not paste into 2 cells

    If you used a userform this could be set up to only except both inputs.

  4. #4
    Registered User
    Join Date
    12-15-2011
    Location
    Dallas texas
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: error message when someone does not paste into 2 cells

    Here is the file I'm looking to get the code in.

    Basically we have a Bill of Materials that gets used over and over and the user is suppose to copy the Part Number with the Description from a file and paste into this file (Column E & F). A lot of times they just do one or the other and the result is incorrect materials ordered for the project.

    I would like a popup to appear (Worksheet change event I guess) if the user paste info in one cell E or F with out changing the corresponding E or F cell as well

    Example they must past both columns not just one

    Part Number (Column E) Description (Column F)
    TZ-131 P-touch tape, 1/2", B/C -Correct paste
    TZ-141 P-touch tape, 1/2", B/C -Incorrect only paste column E not both
    Attached Files Attached Files
    Last edited by mmctague; 07-26-2013 at 11:39 AM.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,830

    Re: error message when someone does not paste into 2 cells

    This macro would go into the worksheet code module. I'm not sure if this will suit your purposes. It will prompt the user to put in the missing information each time a part number or description is entered.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-15-2011
    Location
    Dallas texas
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: error message when someone does not paste into 2 cells

    Thanks that worked good, but I don't want it to pop up if they actually paste into both columns at the same time. Is that possible?


    If the user paste both Column E & F it does nothing.


    If the user paste only Column E & not F or Column F & not E it the message will appear


    Thanks in advance for the help!

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,830

    Re: error message when someone does not paste into 2 cells

    Try:
    Please Login or Register  to view this content.

+ 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. Replies: 0
    Last Post: 05-20-2013, 05:17 PM
  2. error message when Automating copy/paste worksheets
    By curbster in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 10-29-2009, 08:06 PM
  3. Error message when someone paste over Data Validation cells
    By m.cain in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-14-2007, 06:11 PM
  4. Too stupid for copy/paste? Error message
    By dune2 in forum Excel General
    Replies: 3
    Last Post: 11-27-2006, 11:54 AM
  5. Too many formatted cells error message
    By nsando in forum Excel General
    Replies: 1
    Last Post: 05-22-2006, 06:45 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