Color in worksheet

Annebee

New Member
Joined
Jan 26, 2011
Messages
23
I have created several spreadsheets each showing months of the year, what I would like to do is if there is a number in a cell on the previous month fill in the cell with a royal blue color on the current month.
For instance:
Columns are items such as books, lunch, paper, etc
Rows are names of people.
so if John received 2 books in January then the cell for his name under books in january would be filled with blue color.

Thank you for your help
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Thank you tropix, I did try that, one problem I was getting a message stating you cannot use conditional formating between worksheets.

Any other ideas.

Thanks
Anne
 
Upvote 0
How about adding something like

HTML:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    If Range(Target.Address).Value <> "" Then
        Sheets(Sh.Index + 1).Range(Target.Address).Interior.Color = vbBlue
    End If
End Sub
This will assume you always have another sheet after the one you are entering data into.
It should be a good start.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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