VBA to assign Tick-mark to a cell & if cell value changes, Tick-mark changes to red

rtehlan

New Member
Joined
Mar 23, 2017
Messages
19
Hi,

I am looking for update on the below VBA code so that it also adds up a small green tick-mark in the cell & it changes color to red if the value of the cell changes.

Thank you for any help on this.

I am an accountant & tracking changes which have been already finalized is a big nightmare, by this i can easily see if any amounts have changed since i signed off last time.

The previous code is pasted below, This adds up a comment to the cell with the cell value, Username & date.

Sub AddPreparationComment()

Dim vCellValue As Variant
Dim sText As String

vCellValue = ActiveCell.Value
If IsNumeric(vCellValue) Then
vCellValue = CDbl(vCellValue)
End If

sText = Application.UserName & ":" & vbCrLf & vbCrLf
sText = sText & "Value at Prep: " & Format(vCellValue, "#,##0") & "" & vbCrLf
sText = sText & "Date: " & Format(Date, "m/dd/yyyy")

With ActiveCell
.ClearComments
With .AddComment
.Text sText
With .Shape
.TextFrame.Characters(1, InStr(sText, ":")).Font.Bold = msoTrue
.Width = 120
.Height = 50
End With
End With
End With

End Sub
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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