• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Comment Column

dheeraj1688

New Member
I want to create column/cell for comment ,when user edit or write in column/cell his name and content will be highlight with color. then next user insert his/her comment in same cell(different color will be used to differentiate the comments).

Please suggest suggestion/macro to do this.
Thanks in advance :)
 

Attachments

  • Book1.xlsx
    9 KB · Views: 8
Dheeraj1688

Firstly,Welcome to the Chandoo.org Forums

Why not just use the existing Cell Add Comment feature
It lets you add comments and will add the username automatically if it is a new user
You can easily add a UDF to retrieve the Cell's comments to a cell if you want

Copy the following code into a code module in VBA (Alt+F11)
Code:
Function Retrieve_Comments(Target As Range) As String
  Retrieve_Comments = Target.Comment.Text
End Function

to use simply type
=Retrieve_Comments(F4)

where F4 is the cell with the comments
 
Dheeraj1688

Firstly,Welcome to the Chandoo.org Forums

Why not just use the existing Cell Add Comment feature
It lets you add comments and will add the username automatically if it is a new user
You can easily add a UDF to retrieve the Cell's comments to a cell if you want

Copy the following code into a code module in VBA (Alt+F11)
Code:
Function Retrieve_Comments(Target As Range) As String
  Retrieve_Comments = Target.Comment.Text
End Function

to use simply type
=Retrieve_Comments(F4)

where F4 is the cell with the comments




hello sir,
Thank you for reply ..But can i add multiple comments in single cell with different colour. I attached a picture what i'm trying to do in single cell.MS comment feature may be it allow only one comment and every time if i edit the comment i have to write formula again.
 

Attachments

  • pic.jpg
    pic.jpg
    26.5 KB · Views: 5
Guess this is what you are looking for. Change any cell in Sheet 1 it will give the user name changed value user name and date in cell C of sheet1. You will have to specify which color for which username in the code to change the color I have given red as default...
 

Attachments

  • Book1.xlsm
    14.9 KB · Views: 8
Guess this is what you are looking for. Change any cell in Sheet 1 it will give the user name changed value user name and date in cell C of sheet1. You will have to specify which color for which username in the code to change the color I have given red as default...

hi Nebu thanks for reply and help.i am happy with what u provide me.Actually i'm new to excel and i dn't knw where to change the code..
Now problem is what ever i write in sheet1 ,cell (C2) get update with frequent change in sheet.I want to hold previous values also and new values with different color.I don't know the users because that will be move between many people.
 
Hi:
Please find the attached.
Whatever change u make in sheet 1 will be captured in the log sheet.

guess this will serve your purpose ...
 

Attachments

  • Book1.xlsm
    17.1 KB · Views: 3
Hi:
Please find the attached.
Whatever change u make in sheet 1 will be captured in the log sheet.

guess this will serve your purpose ...

hi, again thank u for support ,but this is not possible as sheet contain too much and i'm targeting to a single column (comment Column).I'm happy with the previous code can u make it or (tell me ) for a single cell/column as currently it's updated when i click anywhere in sheet. Plz. help in making it for only single cell or column.So, when i double click on that particular cell macro activate and punch the username and time.
 
Hi:

I have made the changes assuming that column E is your comment column. It is difficult to color code the changes, as you do not know the users beforehand. However, you can anyways distinguish them based on their user name so color coding may not add any value. Please find the attached.

Thanks
 

Attachments

  • Book1.xlsm
    16.2 KB · Views: 3
Back
Top