Excel - Date Validation Based On Rules

Nov 29, 2011

Validation on Excel

The User enters the date in cell D5 - I would like excel to validate the date based on the following rules:

1. Format "dd/mm/yyyy"
2. Prevents entering any weekend dates
3. When the user enters the date it can be the previous or current months date range

I have tried several ways in excel but I can't get anything to work. If an error occurs I want an alert message to appear.

View 7 Replies


ADVERTISEMENT

Excel 2010 :: 3+ Conditional Formatting Rules For Cell Range Based On Formula From Other Cells

Feb 5, 2013

how to apply conditional formatting via VBA to a range of cells based on input from another range of cells. Obviously this would be easy in Excel 2010, but I'm still using 2003 at the office and it needs to stay in this format to be readable by other users:

For cells M8:EK8, my conditional formatting
condition 2: Formula Is =AND($E$8>=M2,(($E$8-$D$8)>=(N2-$M$2))), color index is 40
condition 3: Formula Is =AND($F$8<=M2,$G$8>=M2), color index is 39
I want to add:
condition 4: Formula Is =AND($H$8<=M2,$I$8>=M2), color index is 40
condition 5: Formula Is =AND($J$8<=M2,$K$8>=M2), color index is 39
and so on

The cells in the range M8:EK8 are blank, they only get colored based on input added to D8 to K8. If there is no input, then the cells should be uncolored.

resource tracking ex.jpg

View 1 Replies View Related

InputBox Validation Rules

Jul 12, 2006

I have 2 input boxes. Input Box 1 asks for user's Date of Birth. Input Box 2 asks for user's name: Pretty simple right! They will loop until following 2 conditions are met: If the user enters something in them OR user presses Cancel. If they are empty and Ok is pressed then keep on looping.

View 4 Replies View Related

Use Validation Rules To Only Allow One Input In Multiple Cells?

Oct 5, 2009

Ive been having a little issue with this spread sheet. The problem ive got is I cant get the validation to work where it only allows one yes in a bunch of cells and gives an error message, heres an example of what im talking about.

View 3 Replies View Related

Applying Data Validation Business Rules

May 4, 2012

I am in charge of validating 800+ excel reports coming from our vendors each month. I use excel data validation feature everytime I receive a new file. Data Validation feature is native to the excel workbook and cannot be saved to be used with other workbooks (at least; this is what I think).

What is the best way to write a generic validation script that I can run on any workbook. I am thinking somewhere along the lines of a test script that looks for specific data, data format, required data etc.

Here are some of the rules I have to validate against:

Cells in Column 'A' must contain data, reject if not populated.Cells in Column 'B' must contain a specific value (cat, dog, car), reject if other.Cells in Coulmn 'C' must contain (CA,AMM) only if cells in Column 'D' = 'Yes'Cells in Coulmn 'E' must be in proper casingAddress must use U.S. Postal Service standardsZip Code must be 5digits+4Exclude formatting charecters like '( )' from phone numberMinumum age must be less than or equal max ageMaximum age must be greater than Min ageCheck for populated data in cells, else reject file.Date must be in 'YYYMMDD' formatTime must be in HH:MM:SS' or 'MM:SS' formatID must contain 7 integersThis is a sample that represent 70% of files recived.

View 1 Replies View Related

How To Create Macro In Order To Protect Data Validation Rules

May 15, 2014

create macro in order to protect Data Validation rules.

e.g. If user copy and paste cells from others source which is not in the same validation criteria or not contain any validation rules, the existing validation will gone.

so, is there any macro which will be able to automatically run to prevent the data validation?

View 7 Replies View Related

Calculating Retirement Date Based On Retirement Rules?

Feb 8, 2013

I need to calculate the retirement date of an employee based on the following 3 rules (in essence, the employee's retirement date is whichever rule the employee meets first)

At least 55 years old AND 20 years of service
OR
At least 60 years old AND 5 years of service
OR
At least 65 years old AND 1 year of service

I have Date of Birth in Column F and Hire Date in Column G.

I was able to hack something together when I had only two rules to deal with, but it was a very hard to follow IF statement. With three rules I'm having trouble.

View 9 Replies View Related

Copy Date Rules With VBA Code

Feb 18, 2014

I have a file which I want to copy the lines.

I have made a test file for clarity. See annex.

View 3 Replies View Related

Calculating A Discount Based On Certain Rules

Feb 11, 2009

I'm looking for assistance with working out the following formula. I live on an apartment complex in Marbella Spain and we pay Monthly Community Fees of say $100.

We want to calculate a penalty amount for late payers of say 30% of the monthly fee due for non payers? So for instance if the monthly amount due in Cell D8 = 100 and the actual amount received in cell E8 shows 0 or then increase any figure due for the following month in Cell F8 should increase by 30% ($ 130) in the following month. and so on

I use Excel ver 2003. Trust my query is reasonably clear?

View 7 Replies View Related

Delete Rows Based On Rules

Aug 21, 2007

I am trying to clear row with the following rules:

the last cell must not contain 0, if 0 delete entire row.
the first cell the the A row should be only three character long, if more delete entire row.

Now I managed to delete the 0 in the last cell and but cannot get the VBA to count the characters in the first row and if more than three, delete the entire row . I know to count the characters in a cell is done by Len(Rng.Value) , but getting the VBA right is alluding me .

the script is here,

Sub Del_rows_with_zero_in_column_of_activecell()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Const StartRow As Long = 1 'Row to Start looking at
Dim StopRow As Long
Dim Col As Long

View 9 Replies View Related

Data Validation Rules Not Moving With Data

Feb 24, 2014

creating a spreadsheet for work which is almost working a treat Unfortunately, when a row of data moves from one sheet (Queries) to another (Archive), data validation is lost. Initially I thought I daidn't have it set up on the Archive sheet, but on moving it back to queries (by use of a macro) the validation is still not working. how to keep validation rules WITH data when it is moved please? I will upload my file when I get home from work....network restrictions prevent me doing it here!

View 8 Replies View Related

Automatic Formatting Of Cells Based On Rules / Criteria

Jul 22, 2014

I have a long set of data that I extract a "table" out of based on index matching controlled by 4 different criteria. This part is working as intended. However I need to format the cells with the corresponding "fetched data" based on another criteria. Makes sense? Have a look at a spreadsheet i made representing my problem. It has comments for the problems.

excel tableformatting problem.xlsx‎

View 1 Replies View Related

Randomly Select Cells Based A Couple Rules

Nov 6, 2007

I have a sheet that has 13 players listed in rows down column A. I have 6 columns each representing a quarter in a game. I was wondering what the best way would be to randomly select 5 players in each column and to distribute each cell selection as equally as possible over the 6 quarters.

So what I am doing is having excel designate equal amounts of playing time for each player each game.

Is this possible.

Can I base this off of previous games?

View 9 Replies View Related

Excel 2010 :: Data Validation Won't Accept Start And End Date From Cell Values?

Mar 16, 2014

Data validation in an Excel 2010 workbook.

I want the date input to be restricted a start date and an End date specified in two cells on the sheet. However, when I set up the Data Validation, ANY date will be accepted.

As an example cell Z1 contains the date 1/3/2014 and Cell Z2 contains the date 31/3/2014, so in the Data Validation box, the Start Date is referenced to Z1 and the End Date is referenced to cell Z2.

But I can enter 1/9/2020 and the Data Validation happily accepts that date.

View 12 Replies View Related

Excel 2007 :: Data Validation Based On User Input?

May 24, 2012

In the spreadsheet shown below I would like the user to select a project via a dropdown list in cell B2 which is from the data set shown in row 7 downwards. Then based on the project they select, they need to be able to see all of the locations associated with that project and choose in B3. Finally they then need to be able to select a team which is associated with the project & location combination chosen in cells B2 and B3.

Excel 2007
ABC2
Project3Location4Team56ProjectLocationTeam7Project 1PerthTeam 18Project 1MelbourneTeam 29
Project 1SydneyTeam 110Project 1Brisbane Team 111Project 1Brisbane Team 312Project 1DarwinTeam 413
Project 1DarwinTeam 514Project 2PerthTeam 315Project 2PerthTeam 416Project 2MelbourneTeam 117
Project 2MelbourneTeam 218Project 2SydneyTeam 419Project 2Brisbane Team 6

View 9 Replies View Related

How To Validate If Data In A Cell Conforms To Data Validation Rules In The Cell

Oct 14, 2009

I have an Excel workbook which contains data entry fields, which have different types of data validation rules - like Lists, Date, Whole Number.

I do not want end users to remove these data validations as well as the formatting of these cells by doing copy/paste. So, I have implemented techniques mentioned in the following post, and elsewhere - to override the paste functionality and implement PasteSpecial values automatically.

[url]
To keep it simple, I'm only supporting pasting a single cell at a time.

Now my problem is this:
Doing the PasteSpecial values programmatically doesn't prevent the user from pasting values in the cell that violate the data validation rules. So, I can paste a string into a cell having data validation as Whole Number, or a invalid string into a cell having data validation as List.

The following post just suggests disabling paste whenever data validation is present:
[url]

But I would like to allow the paste operation if the value being pasted is a valid value for the cell's data validation.

View 9 Replies View Related

Formatting Group Of Cells To Have Different Decimal Rules Based On Decimal Value

Aug 3, 2006

Basically, I want to format a group of cells to display 1 decimal figure if the number is not a whole number. If the number is a whole number (or if the rounded first decimal place is 0) I want it to display no decimal.

View 9 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

Excel 2010 :: Cut Row Based On Date In Column

Dec 21, 2011

I have a fairly large database in excel 2010 that in being updated everyday by a employee. In column A there are a set of dates all in the same format 9/1/2011 what i would like to happen is that if there are any dates in column A then it cut out the row and paste it into Sheet1 (the data is stored in sheet2).

View 6 Replies View Related

Excel 2010 :: Automatically Change Value Based On Date?

Apr 18, 2014

I'm relatively new to Excel and I'm currently making a basic spreadsheet for my personal income/spending.

How would I make the "Earned this Month" and "Spent this Month" tabs in the top update on a month to month basis automatically?

For example, in the month of may, it would display may's values, june would be june's etc. etc.

(Excel 2010 w/ Windows 7)

View 3 Replies View Related

Userform Validation If Date Is Within 2 Weeks Of Today Date

Mar 19, 2014

I am setting up some validation on my userform. In this case if a user enters a date within two weeks of todays date they will not be able to proceed onto the next page.

Example: Todays date is 19/03/14. If a user enters 25/03/14 into 'TxtDate' they will not be able to proceed.

[Code] ......

View 2 Replies View Related

Excel 2007 :: Sum Cells Based On Date Range Input

May 28, 2014

I am using Excel 2007.

Sheet 1 - I have columns filled with dates (weekdays only) For example 28-May, 29-May, 30-May up to 28-Nov. Above 10 rows below each date columns and each cell has some values.

28-May29-May30-May
0.50.50.5
1.01.01.0
1.01.01.0
1.01.01.0
1.01.01.0
1.01.01.0
1.01.01.0

Sheet 2 - I have Start date defined in B1 Cell, and End date defined in B2 Cell

I need defining the formula to sum all the cell values fall between the date range defined in Sheet 2 B1 and B2.

For Example if B1=28-May B2=30-May, I want the sum of all the numbers come under the range of 28-May to 30-May, with this above example, it should be 19.5.

View 9 Replies View Related

Formula To Have Excel Select Date Of Month Based On Certain Criteria?

Feb 24, 2014

I am looking for a formula that will select a date in the month based on certain criteria. Found the choose function but not sure if I can really get that to work. I basically have a list of clients, with zip codes, restricted days of the week - and would like the system to group them by zip code and select the best day of the month to schedule an inspection but not pick he restricted day. The goal being have zip codes scheduled together - but on a day other than garbage day. Is this even doable?

View 2 Replies View Related

Auto Populate Excel Calendar Based On Date Ranges

Dec 4, 2013

I am trying to have the calendar in the second tab of the attached excel file to auto populate based on info in the first tab.

In the first tab, there is the start and end dates of certain projects. The calendar will need to only show the project name of every project being worked on that specific day.

Some days will have more than one project being worked on, the Calendar will just need to list them all under that day. The Start and End dates count as days the project being worked on as well. We will also need the calendar to auto update whenever we modify the dates in the first tab or add/remove projects (rows).

View 5 Replies View Related

Excel 2013 :: Select Date Based On Userform Selection?

Apr 5, 2014

I am working with DatePicker calendar. I have two userform with date entries. In one userform I will have 2 textbox to enter dates. In the other one I will have 4 dates to enter. I used to have Excel 2007 with Calendar Control and used to work fine but had to make multiple calendar to control individual Textbox in multiple Userforms.

I am looking for a way to, If a userform is selected to trigger only the textbox name that is within that userform. If I add more entries the code adds automatically the date from the previous userform in the next one.

[Code].....

I was thinking that this would work but it still adds the date to my frmdashboard userform if I am in my frmdata userform.

Is there a way to trigger only the userform that I am currently in?

Using Excel 2013.

Note: I also have a "Clear All" VB Code that will delete every entry in my userform on Initiate but I am looking to not go this path.

View 5 Replies View Related

Excel VBA - Merge And Center Cells Based On Date Values In Row Below

May 22, 2014

I'm using the following code (found here: [URL]......) populate dates in row 13 for a dynamic Gantt Chart...

[Code] ....

It works perfectly to display daily dates in the mm/dd format. Now I want to have an overarching month/year displayed over the entire range for any particular month by merging and centering the cells above the month's dates the above code populates, and pull in the month/year formatted as mmm-yyyy. I've attached a mock up I did manually to convey the desired result.

MergePic.JPG‎

View 1 Replies View Related

Excel 2010 :: Pull Quantity Based On Date Range

Oct 27, 2011

Using excel 2010

In cell U24 I have this formula:

=SUMPRODUCT(($E$3:$E$2000=51014)*($F$3:$F$2000=101)*($K$3:$K$2000))

Currently, as you can see, this is summing up the criteria specified from row 3 to row 2000...(which i made the last row 2000 becuase I will never exceed row 2000 with info)

What I am trying to do is in cell T22 and U22 be able to plug in date ranges and make the above formula give me the sums of thos date ranges.

For example in T22 put in 8-1-11 and in U22 put in 10-1-11, and have the sum of that date range populate in cell U24.

Now ther kicker is this: some dates are repeated so I may have six rows of date 8-3-11....and they will have to be part of the sum total.....and ALSO the dates are not in chrological order....I may have six rows of 8-3-11.......then four rows of 8-10-11.....then maybe another three rows of 8-3-11, and so on and so on...this is for all dates. Sorting the dates in order is not an option.

View 2 Replies View Related

Excel 2003 :: Optimizing Macro To Hide Rows Based On Date

Oct 30, 2011

Operating System: Windows XP, Excel version: 2003

Aim: To create a Macro to hide all rows where the date in column D is before today. Column D has about 600 rows.

Current solution:

Code:
Sub Hide_Old2()

'Worksheet name
With Worksheets("Schedule")
'set start of date range
Set rngStart = .Range("D2")
'find end of date range

[Code] .....

The problem with this solution is its speed, or lack thereof. It causes the screen to hang and flicker while it cylces through. Is there some way to create a range based on the date and hide the range? or another solution?

Note: Autofilter is not an option, as the spreadsheet with the dates needs to be kept simple for other stakholders and the macro is being run from another sheet.

View 3 Replies View Related

Excel 2002 :: Conditional Formatting Based On Date In Adjacent Cell

May 22, 2012

I have columns of figures with times like 5:52:54 and next to them cells with values that i wish to format based on the time.
that is if the time on the adjacent cell is before 8AM then make the value cell have a red border it does not have to be conditional formatting - Excel 2002 in win7/64

View 9 Replies View Related

Excel 2003 :: Calculate Sum Based On Partial Text Match And Latest Date

Jun 19, 2014

I need a formula to do a partial text match on column B to find all rows that contain "825-CL-A", then sum column C for all applicable rows with the latest date. In this example the result should be "4.25 + 6.50 = 10.75". I'm using Excel 2003 for this project.

A B C
7/1/2012 0:00825-CL-A-41091-REG4.00
7/1/2012 0:00825-CL-A-41091-REG6.25
7/1/2013 0:00825-CL-A-41456-REG4.25
7/1/2013 0:00825-CL-A-41456-REG6.50
1/1/2014 0:00825-CL-A-41640-REG4.25
1/1/2014 0:00825-CL-A-41640-REG6.50
3/1/2014 0:00825-CL-E-41699-REG3.00
3/1/2014 0:00825-CL-E-41699-REG4.00

View 14 Replies View Related







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