Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a spreadsheet that a customer uses to provide me with catalog data for
our application. Despite direction, he consistently provides data that exceeds maximum field lenghts for our database. I have tried conditional formatting and restricting the data based on max length but he is often copying the text from Work and just pasting it idirectly nto the Excel cell (not using the text bar). Neither formatting or restricting work in this scenario. Any ideas on how to prevent him from being able to paste in invalid data? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Data - Validation
Text length from the drop-down enter a max number... You can make an message too! "Stacey" wrote: I have a spreadsheet that a customer uses to provide me with catalog data for our application. Despite direction, he consistently provides data that exceeds maximum field lenghts for our database. I have tried conditional formatting and restricting the data based on max length but he is often copying the text from Work and just pasting it idirectly nto the Excel cell (not using the text bar). Neither formatting or restricting work in this scenario. Any ideas on how to prevent him from being able to paste in invalid data? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sean, that only works if you actually click into the cell, then paste the
data. If you copy text from word and just select the cell and paste it won't perform the data validation. "Sean Timmons" wrote: Data - Validation Text length from the drop-down enter a max number... You can make an message too! "Stacey" wrote: I have a spreadsheet that a customer uses to provide me with catalog data for our application. Despite direction, he consistently provides data that exceeds maximum field lenghts for our database. I have tried conditional formatting and restricting the data based on max length but he is often copying the text from Work and just pasting it idirectly nto the Excel cell (not using the text bar). Neither formatting or restricting work in this scenario. Any ideas on how to prevent him from being able to paste in invalid data? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this event code.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 4 Then With Application .EnableEvents = False If Len(Target) 14 Then MsgBox "Listen up Knob! Maximum of 14 characters!!" Target.Value = "" End If .CutCopyMode = False .EnableEvents = True End With End If End Sub Since you don't provide any range, I have used all of Column D and a max. number of characters of 14. Edit to suit. This is sheet event code. Right-click on the sheet tab and "View Code" Copy/paste into that module. Edit to suit and Alt + q to return to the Excel window. Gord Dibben MS Excel MVP On Thu, 25 Sep 2008 12:31:02 -0700, Stacey wrote: I have a spreadsheet that a customer uses to provide me with catalog data for our application. Despite direction, he consistently provides data that exceeds maximum field lenghts for our database. I have tried conditional formatting and restricting the data based on max length but he is often copying the text from Work and just pasting it idirectly nto the Excel cell (not using the text bar). Neither formatting or restricting work in this scenario. Any ideas on how to prevent him from being able to paste in invalid data? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
prevent changes to cell references when copying and pasting | Excel Discussion (Misc queries) | |||
Pasting delimited text from clipboard directly into Excel Spreadsh | New Users to Excel | |||
Is there a way to prevent pasting data into an Excel worksheet? | Excel Worksheet Functions | |||
Pasting Excel data into Word doc. | Excel Worksheet Functions | |||
Prevent Row Height from increasing when Pasting lenghthy text into Cell. | Excel Worksheet Functions |