Forum Discussion

Maksim757040's avatar
Maksim757040
Copper Contributor
Oct 12, 2021
Solved

Save Previous Cell Value Of A Changed Cell In Excel

I don't know English enough, but I will try to write quite good
I wrote mtarler  in comments for the same topics. 
I use Excel 2019
I need a macro for my job files.

There is Excel book(For example: PLAN)
There is second Excel book(TV)

In PLAN there is a cell(B5), and it contains formula, every day a cell will be change.
I want to save 14 meanings in TV(and also I want to have opportunity in macros to change it, for example 30 meanings). One day-one meaning, and after 14 days I want to macros deletes last meaning. It likes history of happening. It likes a calendar of happenings, and I can change number of days. 
In TV I want to have opportunity change row, which I need.


For examle: If 29.09.2021 is last day(for example 14th days) and tomorrow I want to delete 29.09.2021 and Last day will be 30.09.2021.

And if even today my cell is equal to yesterday cell I also want to save it in my history list.
Also I want to macros can update data automatically from PLAN.
I attached 2 files Excel.
I do hope you understand me))
How can I make it?

  • mtarler's avatar
    mtarler
    Oct 15, 2021

    Maksim7570  I'm sorry, you did say you have Excel 2019.  see attached:

    I created formulas for 30 columns to see up to 30 days but you could fill right for more if needed.

    That said, in  previous post you said you wanted another value to the right of those cells and you said for example the data is in A:K and you would have something in L but that would have to be in AF or so to have up to 30 columns available for the data. Or incorporate that cell information as an alternative formula/data in the formula I created based on it being X columns more than then total requested...

     

11 Replies

  • mtarler's avatar
    mtarler
    Silver Contributor
    can i ask you why you want to delete the older values/dates instead of just ignoring them?
    My experience is that historical records can be very helpful to explain and or show proof later on.
    Why not have a running list and on another sheet just present the latest 30?
    • Maksim757040's avatar
      Maksim757040
      Copper Contributor
      It sounds interesting, and I think I don't mind this...
      But I want to change meanings(Now I want 30 meanings, next month I want to see 14 meanings etc.)
      If you can make it, I will be excited
      • mtarler's avatar
        mtarler
        Silver Contributor

        Maksim757040  i still don't know what you really need but here is an example of what I mean.

        In the 1st sheet is a data entry table with date (you can enter today's date by holding CTRL and typing ; ).  Then maybe a couple columns of data (e.g. units sold, price/unit) then a column that has a formula to give you that final value you are interested in.

        On the 2nd sheet I have an input cell to easily change how many you want to view the last X number from the previous sheet).  

Resources