# Offset depending on date

Brendon
Guest
Posts: n/a

 2nd May 2011
What I'm looking to do is have a cell look at a day and determine
whether or not to calculate something.

I have a mileage log that I enter mileage for the month. As I enter
the day ending mileage in one cell, it populates as shown

12/01 THU 1225 1250
12/02 FRI 1250 1275
12/03 SAT 1275 1275
12/04 SUN 1275 1275
12/05 MON 1275 1300

What I would like to do is have it not show the mileage for Sat and
Sun as I don't work these days and just copy down to Monday.

The current formula I have, which doesn't work is:

=IF(ISBLANK(D5),"",IF(WEEKDAY(A6,"1"),"Maybe",IF(WEEKDAY(A6,"7"),"Almost",D5)))

Any help is appreciated.

GS
Guest
Posts: n/a

 2nd May 2011
Brendon laid this down on his screen :
> What I'm looking to do is have a cell look at a day and determine
> whether or not to calculate something.
>
> I have a mileage log that I enter mileage for the month. As I enter
> the day ending mileage in one cell, it populates as shown
>
> 12/01 THU 1225 1250
> 12/02 FRI 1250 1275
> 12/03 SAT 1275 1275
> 12/04 SUN 1275 1275
> 12/05 MON 1275 1300
>
> What I would like to do is have it not show the mileage for Sat and
> Sun as I don't work these days and just copy down to Monday.
>
> The current formula I have, which doesn't work is:
>
>
> =IF(ISBLANK(D5),"",IF(WEEKDAY(A6,"1"),"Maybe",IF(WEEKDAY(A6,"7"),"Almost",D5)))
>
> Any help is appreciated.

The obvious Q to ask here is...

If you don't work Sat/Sun then why are these days in your list?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

GS
Guest
Posts: n/a

 2nd May 2011
GS presented the following explanation :
> Brendon laid this down on his screen :
>> What I'm looking to do is have a cell look at a day and determine
>> whether or not to calculate something.
>>
>> I have a mileage log that I enter mileage for the month. As I enter
>> the day ending mileage in one cell, it populates as shown
>>
>> 12/01 THU 1225 1250
>> 12/02 FRI 1250 1275
>> 12/03 SAT 1275 1275
>> 12/04 SUN 1275 1275
>> 12/05 MON 1275 1300
>>
>> What I would like to do is have it not show the mileage for Sat and
>> Sun as I don't work these days and just copy down to Monday.
>>
>> The current formula I have, which doesn't work is:
>>
>>
>> =IF(ISBLANK(D5),"",IF(WEEKDAY(A6,"1"),"Maybe",IF(WEEKDAY(A6,"7"),"Almost",D5)))
>>
>> Any help is appreciated.

>
> The obvious Q to ask here is...
>
> If you don't work Sat/Sun then why are these days in your list?

More Qs...

Not sure why you are automatically populating the start mileage for
the next day. Is the vehicle not used for personal stuff Sat/Sun? If so
then you'll have to enter the start odometer reading for Mon as a
constant. Same holds true for personal use of the vehicle Mon-Fri after
working hours.

Is your mileage log being used in tax filing? If so, (using odometer
mileage. Divide business mileage by total mileage to get
%UseForBusiness. Multiply total operating expenses(fuel, service &
repairs, insurance, etc.) by %UseForBusiness to get 'elligible vehicle
expense'.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Buffyslay Microsoft Excel Programming 1 15th Nov 2006 12:45 PM erazmus@actrix.co.nz Microsoft Excel Programming 1 22nd Aug 2005 03:31 AM Hari Microsoft Excel Misc 4 17th Aug 2004 05:48 PM SofaKing Scanners 1 27th Mar 2004 03:18 AM Todd Microsoft Excel Worksheet Functions 3 22nd Nov 2003 07:12 PM

Features