Cell change = other cell change

Schu94

New Member
Joined
Jan 24, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi

I'm currently working on a budget scheme, where I've created a listbox when the documents open. There you'll have to choose which month you're making a budget for.

Now I need a macro, that if they change the month then some other cells would have to change their text color. But it should only happen if the month they choose, is not the same as the month that is already in the cell.

example. Last time the document was saved, the month was december. If they choose december when they open the document now, nothing should happen. But if they choose everyother month, cell A1 should change text color.

Currently I've the following code:


D3 is the month of the budget


Private Sub Worksheet_Change(ByVal Target As Range)

Dim cellToChange As Range

Set cellToChange = Range("D3")

'If Target.Address = cellToChange.Address Then

Range("A1").Font.Color = vbRed

'End If
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
In other words - it should somehow remember what is the starting value of D3, when the document opens
 
Upvote 0

Forum statistics

Threads
1,215,731
Messages
6,126,539
Members
449,316
Latest member
sravya

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