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.

552<br />

Part V: Miscellaneous <strong>Formula</strong> Techniques<br />

The following formula is a variation of the preceding validation formula. In this case, the formula<br />

ensures that the entry begins with the letter A and contains exactly five characters.<br />

=COUNTIF(A1,”A????”)=1<br />

Accepting only a date that’s a Monday<br />

The following data validation formula ensures that the cell entry can be interpreted as a date, and<br />

also that the date is a Monday:<br />

=WEEKDAY(A1)=2<br />

This formula assumes that the active cell in the selected range is cell A1. It uses the WEEKDAY<br />

function, which returns 1 for Sunday, 2 for Monday, and so on.<br />

Accepting only values that don’t exceed a total<br />

Figure 19-30 shows a simple budget worksheet, with the budget item amounts in the range<br />

B1:B6. The total budget ($500) is in cell E5, and the user is attempting to enter a value in cell B4<br />

that would cause the total to exceed the budget. The following data validation formula ensures<br />

that the sum of the budget items does not exceed the budget:<br />

=SUM($B$1:$B$6)

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

Saved successfully!

Ooh no, something went wrong!