I have no VBA or other Excel coding experience, but need a couple simple routines.

1. I need a certain cell (A) to equal the result of a certain

calculation. The calculation could return any positive number, but

the maximum value of A is 100,000 (storage capacity of a water tank).

By what formula can I insure that the value of A is < than or = to

100,000? Just to be clear, if the calculation returns 99,999, then that is what A should store.

However if the calculation returns 100,001, then A must store 100,000

2. In a sheet related to the one at issue above, I store daily water

inflow and outflow meter readings. I then subtract today's meter readings from

yesterday's to calculate daily inflow and outflow, and then go on to calculate and store

month-to-date and trailing month's water usage, etc.

The problem is that I do not always get the meter readings daily. I want Excel

to recognize when data is missing, do the subtraction based on today's and the

most recent earlier readings. then do a simple average based on the number

of days of missing data and store the averaged result in each of the cells for

the daily results.

Suggestions? Thank you!