#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Validation

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Validation

In the Thisworkbook module: ** Sample Data Only** Change Rng addresses to suit

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Set Rng = Range("B8,B11,E11,B14,E14")
For Each c In Rng
If c = "" Then MsgBox "Please Fill In Cell " & c.Address & " before
Closing."
If c = "" Then Cancel = True
Next c

End Su

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Validation

Looking back... I might should restrict this code to the Specific Sheet that
your
Form is on - so that other sheets are not affected...

So line 2 should probably be:
Set Rng = Worksheets("MyFormSheet").Range("B8,B11,E11,B14,E1 4")

Just now starting to understand this stuff..

Jim

"Jim May" wrote:

In the Thisworkbook module: ** Sample Data Only** Change Rng addresses to suit

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Set Rng = Range("B8,B11,E11,B14,E14")
For Each c In Rng
If c = "" Then MsgBox "Please Fill In Cell " & c.Address & " before
Closing."
If c = "" Then Cancel = True
Next c

End Su

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Validation

OK, this is it << I think

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If ActiveSheet.Name = Sheets("Sheet1").Name Then
Set Rng = Sheets("Sheet1").Range("B8,B11,E11,B14,E14")
For Each c In Rng
If c = "" Then MsgBox "Please Fill In Cell " & c.Address & " before
Closing."
If c = "" Then Cancel = True
Next c
End If
End Sub

"Jim May" wrote:

In the Thisworkbook module: ** Sample Data Only** Change Rng addresses to suit

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Set Rng = Range("B8,B11,E11,B14,E14")
For Each c In Rng
If c = "" Then MsgBox "Please Fill In Cell " & c.Address & " before
Closing."
If c = "" Then Cancel = True
Next c

End Su

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 663
Default Validation

Hi,

Plese refer to the following link:

http://www.contextures.com/xlDataVal02.html

Challa Prabhu

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Validation

Thanks for the help. I looked at the link--some great stuff--but I cannot
find information on validating to ensure that a cell(s) is not empty.

Could you point me to the info.

Thanks.

JoeP

"challa prabhu" wrote:

Hi,

Plese refer to the following link:

http://www.contextures.com/xlDataVal02.html

Challa Prabhu

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Validation

Joe

If the users ignore the cell you want filled, there is no way to force them to
fill it. DV works only when an attempt to enter data is performed.

In a cell adjacent to the fill-in cells you could have a formula like

=IF(A1="","Please fill-in A1 before moving on","A1 is OK") as a reminder

You could place conditional formatting on the cell to have it colored until
users enter data.

Just as a reminder, of course, not as a way to enforce entering data.

Alternative................

You could use workbook beforeclose code to stop the closing and saving of the
workbook if certain cells are not filled, along with a message reminding them to
go back and do it right.

Then they will screw you over by disabling macros when opening the workbook.

Then you will have to deal with that event.

Easy huh?


Gord Dibben MS Excel MVP


On Tue, 31 Jul 2007 13:56:04 -0700, JoeP wrote:

Thanks for the help. I looked at the link--some great stuff--but I cannot
find information on validating to ensure that a cell(s) is not empty.

Could you point me to the info.

Thanks.

JoeP

"challa prabhu" wrote:

Hi,

Plese refer to the following link:

http://www.contextures.com/xlDataVal02.html

Challa Prabhu

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Validation

Is there a way to validate more than one criteria on a cell? For example I
want to validate that a cell is all caps and has 25 or less characters.

Thanks

"Gord Dibben" wrote:

Joe

If the users ignore the cell you want filled, there is no way to force them to
fill it. DV works only when an attempt to enter data is performed.

In a cell adjacent to the fill-in cells you could have a formula like

=IF(A1="","Please fill-in A1 before moving on","A1 is OK") as a reminder

You could place conditional formatting on the cell to have it colored until
users enter data.

Just as a reminder, of course, not as a way to enforce entering data.

Alternative................

You could use workbook beforeclose code to stop the closing and saving of the
workbook if certain cells are not filled, along with a message reminding them to
go back and do it right.

Then they will screw you over by disabling macros when opening the workbook.

Then you will have to deal with that event.

Easy huh?


Gord Dibben MS Excel MVP


On Tue, 31 Jul 2007 13:56:04 -0700, JoeP wrote:

Thanks for the help. I looked at the link--some great stuff--but I cannot
find information on validating to ensure that a cell(s) is not empty.

Could you point me to the info.

Thanks.

JoeP

"challa prabhu" wrote:

Hi,

Plese refer to the following link:

http://www.contextures.com/xlDataVal02.html

Challa Prabhu

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Validation

You could use
Formula is:
=and(len(a1)<=25,exact(upper(a1),a1))

carloss wrote:

Is there a way to validate more than one criteria on a cell? For example I
want to validate that a cell is all caps and has 25 or less characters.

Thanks

"Gord Dibben" wrote:

Joe

If the users ignore the cell you want filled, there is no way to force them to
fill it. DV works only when an attempt to enter data is performed.

In a cell adjacent to the fill-in cells you could have a formula like

=IF(A1="","Please fill-in A1 before moving on","A1 is OK") as a reminder

You could place conditional formatting on the cell to have it colored until
users enter data.

Just as a reminder, of course, not as a way to enforce entering data.

Alternative................

You could use workbook beforeclose code to stop the closing and saving of the
workbook if certain cells are not filled, along with a message reminding them to
go back and do it right.

Then they will screw you over by disabling macros when opening the workbook.

Then you will have to deal with that event.

Easy huh?


Gord Dibben MS Excel MVP


On Tue, 31 Jul 2007 13:56:04 -0700, JoeP wrote:

Thanks for the help. I looked at the link--some great stuff--but I cannot
find information on validating to ensure that a cell(s) is not empty.

Could you point me to the info.

Thanks.

JoeP

"challa prabhu" wrote:

Hi,

Plese refer to the following link:

http://www.contextures.com/xlDataVal02.html

Challa Prabhu

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?




--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Validation

How can I keep a validation when someone pastes data in from another
spreadsheet? Currently when the user pastes in data the validation is lost.

"Dave Peterson" wrote:

You could use
Formula is:
=and(len(a1)<=25,exact(upper(a1),a1))

carloss wrote:

Is there a way to validate more than one criteria on a cell? For example I
want to validate that a cell is all caps and has 25 or less characters.

Thanks

"Gord Dibben" wrote:

Joe

If the users ignore the cell you want filled, there is no way to force them to
fill it. DV works only when an attempt to enter data is performed.

In a cell adjacent to the fill-in cells you could have a formula like

=IF(A1="","Please fill-in A1 before moving on","A1 is OK") as a reminder

You could place conditional formatting on the cell to have it colored until
users enter data.

Just as a reminder, of course, not as a way to enforce entering data.

Alternative................

You could use workbook beforeclose code to stop the closing and saving of the
workbook if certain cells are not filled, along with a message reminding them to
go back and do it right.

Then they will screw you over by disabling macros when opening the workbook.

Then you will have to deal with that event.

Easy huh?


Gord Dibben MS Excel MVP


On Tue, 31 Jul 2007 13:56:04 -0700, JoeP wrote:

Thanks for the help. I looked at the link--some great stuff--but I cannot
find information on validating to ensure that a cell(s) is not empty.

Could you point me to the info.

Thanks.

JoeP

"challa prabhu" wrote:

Hi,

Plese refer to the following link:

http://www.contextures.com/xlDataVal02.html

Challa Prabhu

"JoeP" wrote:

I am creating an excel spreadsheet different departments will be using and
want to ensure they enter information in certain cells. Is there a way I can
create a rule or validation to make a message come up if they don't fill in
a particular cell?




--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
How to clear validation lists based on other validation lists Ben Excel Discussion (Misc queries) 1 March 12th 07 07:11 PM
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
Data validation with validation lists and combo boxs Keith Excel Discussion (Misc queries) 1 October 12th 06 11:08 AM


All times are GMT +1. The time now is 06:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"