How to disable an automatic calculation for aspecic cell, in a specific day of the week.

bahaloul

New Member
Joined
Mar 31, 2015
Messages
2
Hi,
I'm breaking my head with the following problem


I have 6 cells,(A1, A2, A3, A4, A5, A6) that should be updated with a value of a specific cell "T5"
a single cell per day should be updated.


in Sunday: only A1 should be updated. (with the value of "T5")
in Monday: only A2 should be updated. (with the value of "T5")
etc...




Thanks for any solution.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try this. Don't forget to change the sheet name.

Code:
[COLOR=#0000cd]Private Sub Workbook_Activate()
    Sheets("Sheet1").Activate
    If VBA.Weekday(Date) < 7 Then
        Sheets("Sheet1").Range("A1:A6").ClearContents   [/COLOR][COLOR=#a9a9a9]'<--- remove this if you want to keep results from previous days.[/COLOR][COLOR=#0000cd]
[/COLOR][COLOR=#a9a9a9]        '1 (Sunday) to 7 (Saturday)[/COLOR][COLOR=#0000cd]
        Sheets("Sheet1").Range(("A" & VBA.Weekday(Date))).Value2 = Sheets("Sheet2").Range("T5").Value2
    End If
End Sub[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,225,754
Messages
6,186,826
Members
453,377
Latest member
JoyousOne

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