Posts by ProvenNewbie

    Re: VBA code highlights cell when formula value in the cell changes


    I need the worksheet calculate event because my file has vlookups to a source file. Worksheet change event will not highlight these vlookup reference cells when the formula values change; only when changes are entered manually. Right? How would I go about adding a worksheet change event to this code to prevent the code from highlighting any cell that contains a value in my range?

    Re: VBA code highlights cell when formula value in the cell changes


    I have three codes in different places. See below.


    Standard module

    I have a VBA code that highlights any cells when the formula value in the cell changes in value between a range. I close the workbook. I then open the workbook but now any cell that has a value in my range will become highlighted. I don't want this to happen. I only want the cells that are highlighted prior to closing the workbook to stay highlighted.


    Now, how do I keep these highlights on my worksheet?


    Seeking your VBA expertise!

    Seeking expertise on how to insert comment in a reference cell each time it changes in value in workbook 1. The reference cell contains a vlookup formula that links to workbook 2. When the lookup cell in the workbook 2 changes, the formula value in workbook will also change. I would like to insert a comment in the reference cell to say "Previous value was "previous value that was in the cell" prior to the change. I tried track changes but it doesn't work because my workbook is shared.

    Hello VBA experts.


    I am looking for some VBA expertise.


    I have external reference cells (vlookups) in the destination file that links to the source file. I am looking for a code where anytime a cell value changes in the source file, the external reference cells in the destination file will get highlighted yellow and stay highlighted yellow. If no cell value changes in the source file, the code will skip and move on to the next cell. Any expertise is greatly appreciated. I was thinking worksheet_calculate or worksheet_change event would work but I don't know what code to use to lookup cells in the source file.




    Illustration below: The first table is the destination file. The second table below is the source file.
    [TABLE="width: 440"]

    [tr]


    [td]

    ID

    [/td]


    [td]

    LookupValue1

    [/td]


    [td]

    LookupValue2

    [/td]


    [td]

    LookupValue3

    [/td]


    [td]

    LookupValue4

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]8020456
    [/TD]
    [TD="align: right"]20
    [/TD]
    [TD="align: right"]25
    [/TD]
    [TD="align: right"]5
    [/TD]
    [TD="align: right"]1000
    [/TD]

    [/tr]


    [tr]


    [TD="align: right"]8020457
    [/TD]
    [TD="align: right"]999
    [/TD]
    [TD="align: right"]15
    [/TD]
    [TD="align: right"]60
    [/TD]
    [TD="align: right"]2000
    [/TD]

    [/tr]


    [tr]


    [TD="align: right"]8020458
    [/TD]
    [TD="align: right"]70
    [/TD]
    [TD="align: right"]30
    [/TD]
    [TD="align: right"]25
    [/TD]
    [TD="align: right"]6000
    [/TD]

    [/tr]


    [tr]


    [TD="align: right"]8020459
    [/TD]
    [TD="align: right"]60
    [/TD]
    [TD="align: right"]20
    [/TD]
    [TD="align: right"]80
    [/TD]
    [TD="align: right"]7000
    [/TD]

    [/tr]


    [tr]


    [TD="align: right"]8020460
    [/TD]
    [TD="align: right"]50
    [/TD]
    [TD="align: right"]25
    [/TD]
    [TD="align: right"]90
    [/TD]
    [TD="align: right"]9999
    [/TD]

    [/tr]


    [/TABLE]
    [TABLE="width: 440"]

    [tr]


    [td]

    ID

    [/td]


    [td]

    CellChange

    [/td]


    [td]

    CellChange

    [/td]


    [td]

    CellChange

    [/td]


    [td]

    CellChange

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]8020456
    [/TD]
    [TD="align: right"]20
    [/TD]
    [TD="align: right"]25
    [/TD]
    [TD="align: right"]5
    [/TD]
    [TD="align: right"]1000
    [/TD]

    [/tr]


    [tr]


    [TD="align: right"]8020457
    [/TD]
    [TD="align: right"]999
    [/TD]
    [TD="align: right"]15
    [/TD]
    [TD="align: right"]60
    [/TD]
    [TD="align: right"]2000
    [/TD]

    [/tr]


    [tr]


    [TD="align: right"]8020458
    [/TD]
    [TD="align: right"]70
    [/TD]
    [TD="align: right"]30
    [/TD]
    [TD="align: right"]25
    [/TD]
    [TD="align: right"]6000
    [/TD]

    [/tr]


    [tr]


    [TD="align: right"]8020459
    [/TD]
    [TD="align: right"]60
    [/TD]
    [TD="align: right"]20
    [/TD]
    [TD="align: right"]80
    [/TD]
    [TD="align: right"]7000
    [/TD]

    [/tr]


    [tr]


    [TD="align: right"]8020460
    [/TD]
    [TD="align: right"]50
    [/TD]
    [TD="align: right"]25
    [/TD]
    [TD="align: right"]90
    [/TD]
    [TD="align: right"]9999
    [/TD]

    [/tr]


    [/TABLE]



    Here is the code that I created to start conversations and hopefully solve this post.


    end Sub