The code works, it just does not do what you need, because it has to be done in a different way. The color index of the basic cell is obviously not changed manually. Provide some sample data and explain in detail what exactly you need. Also explain how the number colors are changed - Conditional formatting or Custom number format.
I apologise. I a new to VBN coding. To be more clear.
I have a sheet that is used for balancing deposits paid and refunded the following information is used.
Date, Name, Money paid or refunded and the initials of the staff member entering the information.
For Example
A4 = DATE, B4 = NAME, C4, D4.E4 AND F4 = THE DOLLOR AMOUNT PAID OR REFUNDED, G4 = THE INITIALS OF THE STAFF MEMBER
When the dollar amount is entered I have a code for the amount to change font color to RED if it is a refund to a customer and to stay BLACK if it is a payment to the business.
I require A4, B4 and G4 to change RED when a REFUND occurs.
Here is the code as I have it so far.
Private Sub CommandButton2_Click()
Dim myRange As Range
Set myRange = Range("c4:f42")
For Each Cell In myRange
If Cell.Value < 0 Then Cell.Font.ColorIndex = 3
Set myRange = Range("c4:f42")
If Cell.Value > 0 Then Cell.Font.ColorIndex = 1
Next
Thank you for your help