PDA

View Full Version : Data validation



kantian1
10-12-2008, 12:14 PM
Hi,

I want to check cells against one another.

So that if data has been entered into cell A1, then cell B2 must also have information entered into it otherwise a warning message of some sort pops up.

The only problem is that no VB code can be used to solve this problem.

Although I would like to know the VB code if someone can work that out as well.

Thanks.

mdmackillop
10-12-2008, 12:41 PM
Is this a homework problem?

kantian1
10-12-2008, 12:43 PM
Hi,

I'm a bit old for homework.

Thanks.

mdmackillop
10-12-2008, 12:49 PM
OK
So how about =IF(A1<>"","Please enter data","") in B2
Regards
MD

kantian1
10-12-2008, 12:55 PM
Hi,

I just get a #VALUE! error in the cell?

Thanks.

Sorry, it does work, thanks.

mdmackillop
10-12-2008, 01:00 PM
See attachment

kantian1
10-12-2008, 01:09 PM
Hi,<br><br>Sorry, it does work, but how can I offset this formula so the message appears in B2, C2, D2 etc. but the formula is stored somewhere else?<br>So when data is entered into these cells the formula is not overwritten?<br><br>Thanks.<br>

mdmackillop
10-12-2008, 01:52 PM
Enter in C2
=IF(AND(A1<>"",B2=""), "Please enter data","")

kantian1
10-12-2008, 02:00 PM
Thanks for your help.<br>