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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
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,223,104
Messages
6,170,126
Members
452,303
Latest member
c4cstore

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