Change formula automatically on 7th day. XL2007

BRUCE FOOTE

New Member
Joined
Sep 21, 2006
Messages
7
EXCEL 2007
I have a spreadsheet that graphs the difference of two inserted values daily using the simple formula:
=IF(E945="","",E945-E929) & =IF(F945="","",F945-F929) in column I & J respectively
For example note: Row 945

Column:A-----B--------C----D--E--F--G--I--J
3/27/2011 1:59 AM XXXXXXX -0 46 88 0 0 4.00

There are 10 rows collected daily (row 945 -954).
Every 7th day (Sunday night) the formulas must change to =IF(E945="","",E945) & =IF(F945="","",F945) for one day and then for M- St it must return to (E945="","",E945-E929).

Can someone help me out with a formula or macro which will automatically change the formula on the 7th day? I’m stuck. Thanks.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
mikerickson,

sorry for the delay at getting back to you.

I changed the formula to:

=IF(E205="","",IF((WEEKDAY(A205)=1),E205,E205-E187))

and applied it to every cell in columns I & J. This works fine for my application.

Thank you for breaking my 'mental roadblock' & helping me with this simple fix.

Bruce

As an explanation to newer users that might view this post (: This nested if/else construct utilizes the WEEKDAY fx which evaluates a date (col A) and = 1 when date is Sunday, 2 for Monday, etc. (see 'help' for further explanation). So, if E205 is blank EXCEL prints blank; else if WEEKDAY in col A is a Sunday (1) i.e. if it is true, then it prints the value in cell E205, else if the date = any other day of the week 2-7 (i.e. if false) it prints the difference between E205 & E187.
An explanation of how a formula works has always helped me.
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,445
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top