Copy Validation To Row Above?

Mar 3, 2013

I'm trying to set up a spreadsheet for users to update with details of customer service problems. A few of the columns have data validation against them (the master lists are on another worksheet) but I want to be able to copy the validation to a new row when created.

I've found this macro which seems to do the trick in terms of creating a row and copying the validation - but there's a couple of things that I'd like to amend...

VB:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim LR As Integer
If Target.Column > 1 Then Exit Sub

[Code].....

Firstly, I want to be able to create a new row above what was entered previously. The macro works fine as it is, but as the spreadsheet grows and grows, I don't want users to have to scroll down to the bottom of masses of information. I'd rather have it so that every time a user double clicks in cell A2, the data shifts down but the validation that was in row 2 remains in row 2.

Also, at present in the macro above the value in column A for the new row is 1 greater than the row previous. I'd like that to still happen even when the new row is going above the previous data. Trying to prevent duplicates is another reason why I'd like the macro to only run if cell A2 is double-clicked.

View 1 Replies


ADVERTISEMENT

Copy Validation From One Range To Another

Nov 13, 2006

how to fix the following? The variables are predefined, the syntax for copying the validation is incorrect.

Range(P1start, P1start.End(xlToRight)).Validation.Type = P1input.Validation.Type
Range(P1start, P1start.End(xlToRight)).Validation.Formula1 = P1input.Validation.Formula1

View 8 Replies View Related

Date Data Validation And Copy

Jan 20, 2009

Perhaps an easily resolved issue, but one that stumps me. I'm building a spreadsheet that allows users to enter a date in a cell (A1). I want to restrict entries to only permit the date as MM/DD/YYYY, to include leading zeros, if necessary, so that the entry is ten digits long.

Then, I want that user entered date to transfer to another cell (B1) and transformed to the date with leading and trailing asterisks (*MM/DD/YYYY*). That entry will be displayed in bar code font. Cell B1 is to be generated by the spreadsheet, so that the user only makes the date entry in cell A1.

Formatting A1 as a date field presented many problems, to include an inability to select the ten-digit format. So I've formatted this cell as a custom cell, which works well in tranforming user entries such as 1/1/09 to the required 01/01/2009.

Problem 1: I can't get the data validation error alert feature to work properly. I set the condition to allow text length equal to 10, and every entry I try produces the error message. I've also set the condition to allow custom data using the formula MM/DD/YYYY. That also produces the error message regardless of entry.

Problem 2: I can't figure out the formula to add the asterisks to the front and back of the date for cell B1. The closest I can get is the asterisks with the date converted to a number.

View 4 Replies View Related

Add Sheet, Copy Data With Validation

Aug 26, 2008

Their is sheet in which some online data is comeing.

#1 I have to copy that data in another worksheet and its name shud be last 3 characters of the sheet in which data is comeing.
Say for example data sheet is abcd_2781 so new sheet name shud be 781

#2 now i have to copy the data based on certain validation
the sheet has 14 colums

the data keep coming in....every time it comes with a unque ID.
but when it comes there is a colum which tell us three operations
0=NEW
1=change
2=DELETE

And so when ever we copy data it shud only copy 0,1,2 it shud not copy new, change or delete.

Now there is one more colum in which their is entry ID, it carried diff ID for NEW transactions. But when ever their is change or delete it will be same what ever was generated when it was new. so the validation shud be

when its 1= change it should match its Entry ID and delete the complete ROW with all previous same ID keep this only

When its 2= Delete it should match its Entry ID and Delet the complete row with all same including itself.

i am attaching the input and out put data
Input data Output data
MDUpdateAction MDEntryID MDUpdateAction MDEntryID
0=NEW 100302 0 100302
0=NEW 100303 0 100305
0=NEW 100304 0 100306
0=NEW 100305 0 100314
0=NEW 100306 0 100313
0=NEW 100314 0 100315
0=NEW 100313 0 100316
0=NEW 100315 0 100293
0=NEW 100316 1 100291
0=NEW 100291
0=NEW 100292
0=NEW 100293
2=DELETE 100303
2=DELETE 100292
2=DELETE 100304
1=CHANGE 100291

View 9 Replies View Related

Validation Removed By Copy Paste

Jul 4, 2007

I'm some cells with validation but when I copy some data (whose cells do not have the validation), and paste onto the cells with validation, the validation is no longer there.

How could I ensure that the validation is still there after the Copy-Paste action? Since the spreadsheet is used by multiple users, I can't force the users to do a Paste Special.

View 4 Replies View Related

Validation Of Copy / Paste Data By Macro

Sep 26, 2013

Template is created where the users copy/paste the data from other file. Data validation has been performed with the following steps:

1. Macro inserts the vlookup formula into column A, which isused for validating data that is entered by user from column B to E.
2. If the data is incorrect the N/A will be displayed in column A and invalid data will behighlighted in red color in column B.
3. This validation goes through the loop and after the loop is finished the pop message will be displayed and macro should stop so the user can correct the data.
4. After the user correct the data, the macro needs to run again to make sure there is no further errors. If there are no errors, thehighlighted cells should be cleared out of color and pop.

Here is the code that runs by command button:

Private Sub CommandButton1_Click()
Call FindNA
End Sub
Sub FindNA()
Dim ResultRange As Range
Dim ResultCell As Range
Dim iRow As Integer

[Code] ......

View 1 Replies View Related

Data Validation - Copy / Paste Over Cells

May 1, 2014

I want to prevent copying and pasting over cells with data validation as this means the validation is overwritten. To get around this I've selected all the cells with data validation and unlocked them, then protected the worksheet with all boxes ticked apart from format cells, columns and rows.

This prevents copy/pasting from overwriting data validation but it doesn't prevent data being pasted in that doesn't meet the validation criteria.

So for example, say -1 is in cell A1, with no data validation. In B1 there is data validation, which doesn't allow negative numbers to be entered. If I copy and paste A1 into B1, the data validation isn't overwritten, but it doesn't stop the non validated data (-1) from being entered! If I then double click on B1 and press enter it recognises the validation criteria is not met.

View 3 Replies View Related

Copy Text To Multiple Sheet With Validation

Nov 30, 2009

i'm trying to do (for the past couple of days manually) is copy the names from the 2nd sheet to the 1st sheet but need to make sure that the proper location ID match that of the 1st sheet. If two names is assigned to the same location, a new line will be added to the 1st sheet but never allow if the location ID do not exist.

<1st Sheet>
A1, B1, C1, D1
ID, Name, Loc ID, Location, contact, date
1011,-, 101, 1/F, RM101,-
1012,-, 102, 1/F, RM102,-
1013,-, 104, 1/F, RM104,-
1014,-, 203, 2/F, RM204,-


<2nd Sheet>
Name, Loc ID, date
Thomas,101,10/03/09
Anthony,101,11/02/09
George, 102,11/25,09
Susan,203,10/31/09
Carrie,103,11/20/09

View 4 Replies View Related

Validation List Choice To Copy Row From Another Sheet

Dec 17, 2008

I need to get data copied from sheet1 to sheet2
depending on selection in a validation list.

The data is on the same row and all the same range.
So it would look something like this.
A B C
Fruit Orange Apple Pear
Veg Potato Carrot Onion
Animal Bear Cow Dog

I have the data in A in a dynamic range and validation list.
I need all the data copied from the specific rows ie
choose Animal from the validation list in Sheet2!A1 and
the entire row Bear Cow Dog get copied to Sheet2!B1, Sheet2!C1, Sheet2!D1.

The second problem I think is a lot more complex.
So the same scenario above but this time its a multi select on Sheet3.
I need to be able to select two (or more depending on Fruit and Animals to display in A1, A2 and then their valid options to appear in B, C and D

View 9 Replies View Related

Prevent Copy Paste Over Data Validation Cell?

Mar 27, 2009

I set up a spread*** with drop-down menus for some of the cells. The user can only select values from that list and an error message pops up when something is typed it that is not in the list (via Data Validation

Error Alert).

So this works all fine ... except if the user copies and pastes a cell with a different drop-down menu into a cell overwriting the existing validation.

I cannot totally lock the work*** and if I lock the cells with the drop-down menus nothing can be changed. So how can I prevent this from happening? Is there a way to block all copy/paste operations that are copying the validation? I know that with the Paste Special I can have cells copied without the validation.

View 14 Replies View Related

Change Validation List Value And Copy / Paste From Dependent Cells?

Jun 12, 2014

I have a sheet which autofilters according to a validation list in cell E2 using the code.

I have then used subtotal arrays to calculate the mean, median, max, min and total count for whichever values the filter shows.

What I want to do next is have a code which will select each possible option from the validation list (triggering the autofilter) and copy and paste the values from each dependent formula into a new sheet.

Attached File: dummy 1.xlsm

View 7 Replies View Related

Copy Paste Special As Values Based On Validation Cell Contents

Jan 27, 2007

Need VBA macro that will copy & paste (Special > AS VALUES) from one of two (Data A & B) sheets based on the contents of a validation cell ($D$4) in a third (Report) sheet? The destination starting cell would be $F$11. ALSO - I'd like to have the Named Ranges "DataAExtract" & "DataBExtract" used in the code (for the COPY region) so I can see an example of how to reflect my actual named ranges in my working file.

The reason for doing this is that the "c.Characters...." lines in my conditional formatting macros (attached) are not working on cells containing formula output (in my working file the Report page is all populated by VLOOKUP results), but the macros run fine on hard-coded values. In my attached workbook, I'd like to have the "NEW" macro for the copy & paste step fire first in the sequence of macros running after the FORM button-click (control located in cell $D$5 of the Report sheet), whether that's by writing a new macro and calling mine before the new one ends, OR by consolidating all of my macros plus the new one into one smooth progression.

With this low-tech approach I can get updated VALUES into the report area once the user selects a data source and a customer on the report sheet. The COPY ranges in my working spreadsheet will update based on the selections made in the report page. I tried recording a macro and then modifying the recorded code to add the "If > Then" functionality I'm looking for, but I'm pretty green when it comes to VBA code and syntax.

View 3 Replies View Related

Clearing Validation Values Based On Another Validation

Nov 11, 2008

A2's validation is dynamic as it's selectables varies based on the selection made by the A1 Validation. (=indirect(a1)).

My problem is this....once if have selected from both validations...if I go back and change the A1 validation to a blank (or empty value) or clear the contents on that cell....validation A2's value remains as it was. I would like it to recognize that A1 is blank and also become blank (or goto an empty value).

View 2 Replies View Related

Data Validation :: Selected From 4 Validation Lists

Sep 26, 2007

I would like to know if it's possible to populate a data validation list based on what is selected from 4 validation lists?

for example:
On sheet1:
If 'Group1' is selected from data validation list1 then data validation list5 will show a list of all items from Group1. If 'Group2' is selected from data validation list2, then data validation list5 will display all the items in 'Group2'...

(I do not want to use a combo box for this)

View 9 Replies View Related

Copy Cell Value To Cell On Different Tab That Has Data Validation

Sep 11, 2013

I have a cell in Sheet1, C5 that is a formula that returns one of 2 values.

I have a macro that copies and pastes values from this sheet into Sheet2, however I cannot get the cell V3 in Sheet2 to have the value of C5 in Sheet1.

There is a data validation list of 3 choices in V3, two of which are available from Sheet1 C5, but I want the 3rd option to remain manual.

I have been playing around with it and even tried the manual recorder, but no luck

Here are some of my attempts:

Sheets("template").Cells(3, 22).Value = Sheets("New Details").Cells(5, 3).Value

or

Sheets("template").Activate
Sheets("template").Select
Range("V3").Value = Sheets("New Details").Range("C5").Value

Neither of which have the desired effect.

View 1 Replies View Related

Nested Data Validation: Figure A To Enforce Dual Data Validation On A Single Cell?

Aug 19, 2009

I'm trying to figure a to enforce dual data validation on a single cell. That is, I need to restrict the user to entering only a decimal value, only if a particular other cell (say A2) is blank. To put it another way, if A2 is blank, the user can enter a decimal value, but if A2 is not blank, the user cannot enter anything. I can use Data Validation to enforce either the decimal restriction or the ISBLANK, but I'm not sure how to make them work together.

View 2 Replies View Related

Data Validation Used To Create Separate Data Validation List

Feb 15, 2014

I have 2 columns First Name & Surname. What I want to do is create a data validation list on the surname which results in the 2nd data validation list only showing the first names which link to one of the surnames.

i.e. If I selected Smith in the 1st validation list then I would only like to see 'Paul' as an option in the 2nd list

First Name
Surname

Paul
Smith

Paul
Jones

Tony
Phillips

View 1 Replies View Related

Data Validation - Add Some More If / Else But Validation Don't Allows It?

Jun 30, 2014

I had some of values in Column A, B & C for ex: column A has brand name, column B has model name and Column C has sub_model name here i have a limited values i need to make it as drop down list but i had a problem with the below formula.

=IF($F$2=Sheet2!$H$2,al_v,IF($F$2=Sheet2!$H$3,am_v,IF($F$2=Sheet2!$H$4,au_v,IF($F$2=Sheet2!$H$5,be_v,
IF($F$2=Sheet2!$H$6,bmw_v,IF($F$2=Sheet2!$H$7,bg_v,IF($F$2=Sheet2!$H$8,cv_v,I
F($F$2=Sheet2!$H$9,ch_v,IF($F$2=Sheet2!$H$9,ch_v,"")))))))))

i need to add some more ifelse but the validation don't allows it.

View 2 Replies View Related

Data Validation: Can I Use Data Validation In A Cell That Has Formulas In It?

Apr 3, 2009

I have attached a sheet that I am working on. I want cell G1 to be less than or equal to 165. That cell contains a formula. If the formula takes the number to over 165 the validation is allowing it.

View 2 Replies View Related

Change Validation Value From 1 Cell Will Change Other Validation Value?

Apr 6, 2013

when I select a data validation value in cell A3 of sheet 1 will change the data validation value in A5 of sheet 2, and verse vice.

Also in the same attached file, I want to solve another formar issue. The needs is expained in the file.

View 8 Replies View Related

Link Validation List To Another Validation List?

Jul 1, 2013

I have a list for example with two variants "YEs, "NO"..

Is there any possibility to choose YES or no in any cell an reflect the same value in another list on another sheet.

View 8 Replies View Related

Validation List To Depend On Another Validation List

Sep 9, 2006

I'm not sure if its possible to do what I want. I'm trying to do it without VBA as my users might have a high macro security setting.

I have a validation dropdown in A2 where they pick 'yes' or 'no' for FLSA. I would like B2 to be a dropdown (validation, listbox, whatever) that would change based upon A2. If A2 is 'yes' I want to use the data in A5:B7 and if its 'no' use A10:B12. Ultimately I want B2 to equal one of the numbers from A5 - A7 or A10 - A12. However when they click on the drop down they see the combo of column A and columb B as column A has no meaning for the user.

View 9 Replies View Related

Validation Below Or Above

Apr 18, 2007

I want to make a cell validated so that a user can only enter a value that is either below -0.1 or above 0.1. This is not necessary the next but is desirable to set a maximum of 999.99 and -999.99.

View 4 Replies View Related

Date Validation With VBA

Apr 17, 2013

I inherited a spreadsheet and the date validation does not work. It checks for the formatting of the date being entered, and when anything is entered is returns the pop-up error message. so even when a correctly formatted date is typed into the cell the error message prevents the user from entering the new date. I have checked and cannot find the problem. I even tried formatting the cell with Crtl-1 to ensure the date being entered was formatted right, but still does not work.

This is the code snippet for three columns I am working with:

VB:

columns("G:G").Select
With Selection.Validation
.Delete
.add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="format(""m/dd/yyyy"")"
.IgnoreBlank = True
.InCellDropdown = True

[Code]....

View 1 Replies View Related

Can Validation For This Sheet

Apr 4, 2008

I have a spreadsheet (attached is an example).

The problem I have is that there is a check cell in column J that either "A" "B" or "C" can be entered and the total in column K can be used in different sheets in the workbook.

Here is the part I cannot get to work, If "C" is selected in the check coulmn then Columns G,H,I, are not allowed to contain numbers and a warning dialog should appear on screen. I have tried numerous ways to get this to work and have given up

View 9 Replies View Related

Validation And Linking

May 27, 2008

I've attached a basic excel file with an example of the problem I need to solve. As you can see, if you select "No" to "Do they have a pet?" then conditional formatting blocks out the next field. The problem with that is, it still allows you to enter a value into the "Type" field which is skewing my results. Is there a way to allow a value in "Type" ONLY if there is "Yes" in "Do they have a pet?". I would also like it to delete the value in "Type" if I later select "No" instead of just covering it up. Is this possible? I'd like to avoid the scripting route if at all possible but I'm not sure it is...

Also, I have two linked spreadsheets, one pulls the totals off the other. However, If I add rows into the original it does not update the total formulas in the second sheet. Is there a way to make it do this automatically?

View 10 Replies View Related

Dependent Validation

Feb 19, 2009

Is there any chance someone could post an example file for this? I cannot figure out how to set it up.

View 14 Replies View Related

Cell Validation?

Jul 22, 2009

I need a code/formula/validation that needs to go in cell C3 and D3. If B3 contains the following, Transactional Accounts, Notify Me and Enhanced Notify Me than there has to be a number/reference number in C3 and D3. If there is no reference number than a warning needs to pop up informing them that they need to put in a reference number or ID number before they continue. If there is no reference number or id number they cannot move on, or something of that sort.

View 2 Replies View Related

Dependant Validation

Aug 3, 2009

Basically what i need to do is create a validation list, the contents of which will be dependant on the entry in another cell. The catch is that the other cell contains an "if" formula.

eg.

A1: 10
B1: =if(A1=10;"A";if(A1=11;"B";if(A1=12;"C";"Invalid Entry"))) ....

View 9 Replies View Related

Validation On Entry

Jan 19, 2010

Hi I have a column where a cheque number can be entered I need to check on entry that the cheque number has not been used before further up the column.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved