11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 19: Conditional Formatting and Data Validation 551<br />

This formula assumes that A2 is the active cell in the selected range. Note that you can’t use this<br />

formula for a cell in row 1.<br />

Accepting nonduplicate entries only<br />

The following data validation formula does not permit the user to make a duplicate entry in the<br />

range A1:C20:<br />

=COUNTIF($A$1:$C$20,A1)=1<br />

This formula assumes that A1 is the active cell in the selected range. Note that the first argument<br />

for COUNTIF is an absolute reference. The second argument is a relative reference, and it adjusts<br />

for each cell in the validation range. Figure 19-29 shows these validation criteria in effect, using a<br />

custom error alert message. The user is attempting to enter 16 into cell B5.<br />

Figure 19-29: Using data validation to prevent duplicate entries in a range.<br />

Accepting text that begins with a specific character<br />

The following data validation formula demonstrates how to check for a specific character. In this<br />

case, the formula ensures that the user’s entry is a text string that begins with the letter A (either<br />

upper- or lowercase).<br />

=LEFT(A1)=”a”<br />

This formula assumes that the active cell in the selected range is cell A1.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!