![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
I have a worksheet that contains one column where an amount is entered if an offer is made ($). The next column contains the date the offer was made.
I want to set up validation rules in the date column to insist that whenever an amount is placed in the offer column, a date must be placed in the date column. Only some rows contain offers. Thanks. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi Grache...
What are your columns? Offer = ? Date = ? Thanks, Tom |
|
|
|
|
|
#3 | |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Hi Tom
column J contains the settlement amount offered (ie $10,000). Column K contains the date the offer was made (ie 19/04/02) Thanks Quote:
|
|
|
|
|
|
|
#4 | |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi Grache.
This code will force the issue. If any change is detected in the offer column, the code will check for a valid numeric amount. If not valid, a message will appear warning the user to enter a valid numeric amount and focus will be reurned to that cell. If the number is valid, then a message will warn the user to enter a date in the date column. No exit from the cell will be allowed until a valid date is entered. To use this procedure, simply right-click on your sheet tab, choose "View Code", and then paste this in the window which now appears. Close this window and try and enter some text in the Offer column. Tom Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|