Add A comment every time a Cell is changed in Excel VBA - Code Included

Поделиться
HTML-код
  • Опубликовано: 8 ноя 2024

Комментарии • 41

  • @Hello-Online-Students
    @Hello-Online-Students 2 года назад +2

    Thanks a lot sir,It's really helpful to me.I wanted this vba formula.God bless you.

  • @datadev1
    @datadev1 8 лет назад +1

    Sweet example.for keeping track of value changes and who did them. I might also add date and time.

  • @SuperHanme
    @SuperHanme 4 года назад +1

    Thank you for this great VOD

  • @coogs9335
    @coogs9335 7 лет назад +2

    Great job, thanks for sharing the knowledge, just what I needed. Keep up the great work boss!

  • @vrr97
    @vrr97 Год назад

    Thanks brother ,
    If i have to record comment in 6 columns only not for the entire sheet then how to change this code

  • @poshady2
    @poshady2 8 лет назад +2

    wonderful coding ,great idea

  • @Kirill628
    @Kirill628 3 года назад

    Спасибо дружище

  • @sontrinhvan1500
    @sontrinhvan1500 4 года назад +1

    Great idea!

  • @renedanos8877
    @renedanos8877 5 лет назад

    Can I apply to all sheets in the workbook?

  • @mzabaneh
    @mzabaneh 5 лет назад

    Thank you for this great VOD, I worked with this on a PC excel and application.username returns the user name. but when I open this same xls on mac I get generic Microsoft Office user. I tried using Environ ("USR") which returns My login id. but that same environ does return the same this on PC. is there a way to write the code so it know a difference between a mac and PC.
    Help Please.

  • @nd8961
    @nd8961 4 года назад +1

    What code is required please when you want to show a comment only with selected columns, like "A1: A250", "C1:250 ", "F1:250" & "J1:250". Not all columns and rows. Thanks

    • @EverydayVBAExcelTraining
      @EverydayVBAExcelTraining  4 года назад

      You have us the target.address or target row.
      With and if statement

    • @nd8961
      @nd8961 4 года назад

      @@EverydayVBAExcelTraining Thank you. I have used the Target, Intersect and specified the range .

  • @mreyesa
    @mreyesa 6 лет назад +1

    thank you very much , very useful, to follow up task

  • @Lu_Ca
    @Lu_Ca 6 лет назад +1

    Hi, is there a way to add a dynamic comment when I select a cell? for example if I click on a cell with a date it will temporarely have acomment with the day of the week

    • @EverydayVBAExcelTraining
      @EverydayVBAExcelTraining  6 лет назад +1

      You would nees to use on_change.
      So when a cell is changed you would need to read the target cell value and then insert info into the comment

    • @Lu_Ca
      @Lu_Ca 6 лет назад

      thank you! I'll try it

  • @MohanKumar-my1kw
    @MohanKumar-my1kw 4 года назад +1

    is there any possibility to update data which is existing in excel sheet, it should auto update in comment box as well

    • @EverydayVBAExcelTraining
      @EverydayVBAExcelTraining  4 года назад

      Yes that is doable but would be hard to explain here without fully know what you were trying to do

    • @MohanKumar-my1kw
      @MohanKumar-my1kw 4 года назад

      @@EverydayVBAExcelTraining i have a database in sheet one, and in 2nd sheet i done consolidated, in the consolidated sheet if i take mouse pointer particular cell comment box will popup, in that if example 10 employees are there in x department all the particular department employees names should auto update when i change in sheet 1.

  • @dengvarona8364
    @dengvarona8364 6 лет назад +1

    how about adding a timestamp + the application user?

  • @renedanos8877
    @renedanos8877 5 лет назад

    Can the comment box list original content and new content

  • @ryan21370
    @ryan21370 7 лет назад

    Hi there, how can I set the range is C4:k1000? Thanks.

    • @EverydayVBAExcelTraining
      @EverydayVBAExcelTraining  7 лет назад

      +Ryan wu
      Dim rng as range
      Set rng = range ("c4:k1000")

    • @ryan21370
      @ryan21370 7 лет назад +1

      Thanks for your prompt response. When i apply it, the "for each in target" is error, and i change to " for each in rng", however, the exiting cell commend will add one more time for each time a cell edited. Can you please advice how to fix it? thanks.

    • @EverydayVBAExcelTraining
      @EverydayVBAExcelTraining  7 лет назад

      it would most it would need to be
      for each cl in rng.cells OR for each cl in rng
      let me know if that helps

    • @ryan21370
      @ryan21370 7 лет назад

      I tried that, after edit any cell in the range, the code "Elseif Not c.comment is nothing...." will run for all cells. Then all cells comment will add a new with current information in cell (did nothing with the cells), how to limit it run in the cell in editing?

    • @nielsjohannesen9209
      @nielsjohannesen9209 4 года назад

      @@ryan21370 Did you ever solve this?? I Have the same problem

  • @irfanbayg
    @irfanbayg 5 лет назад +1

    Need help. comment is added only when deleting a cell. i am using excel 2016.

    • @EverydayVBAExcelTraining
      @EverydayVBAExcelTraining  5 лет назад

      You would use the on change event
      Where target.value = ""
      The challenge is figuring out what it was prior to deletion

    • @irfanbayg
      @irfanbayg 5 лет назад

      @@EverydayVBAExcelTraining Thanks for your quick response. but i am novice in VBA so i could not get what you said. kindly elaborate.

    • @EverydayVBAExcelTraining
      @EverydayVBAExcelTraining  5 лет назад

      Are you trying to get the value in the cell prior to deleting it?
      Or are you just wanting to know when a deletion happens?
      Can you paste your code and I can take a look

    • @irfanbayg
      @irfanbayg 5 лет назад

      @@EverydayVBAExcelTraining thank you. i am just getting a blank comment with user name when deleting cell value. but when i change value, it is not recorded as in video.

    • @irfanbayg
      @irfanbayg 5 лет назад

      i am using the code you provided in description.

  • @taoli5497
    @taoli5497 5 лет назад

    👍