+ Reply to Thread
Results 1 to 2 of 2

Lock contents in a cell referenced from another cell

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Lock contents in a cell referenced from another cell

    I have a unique complication for a nutrition tracker i built for Weight Watchers, and it could very well be one that is not resolvable the way I have it. Here is the scenario.

    I have a column being totaled by a simple SUM equation in cell (E21)

    I have a single cell (B20) that pulls the date and the output of that will only say the day of the week (Monday, Tuesday, etc..) Example (=TEXT(WEEKDAY(O23), "dddd"))

    At the bottom of the sheet, I have a table for Monday thru Sunday. The current code in the cell next to each weekday, Monday (A40) for example, basically says if today's day (B20)=Monday(which A40 would be reporting if it is Monday), then the cell equals the sum from (E21). So all the input being totaled in my sum formula is being tracked for Monday, automatically.

    Here in lies the issue. Once saved, and re-opened on Tuesday, the total obviously moves in my table to Tuesday because Monday’s formula becomes false, and Tuesdays becomes true. Or, if SUM data becomes deleted to start tracking a new day, of course, the information in the table goes away or becomes 0.

    Is there a Macro or code I can use that will LOCK the sum in the table, so instead of code pulling the total, a MACRO will just lock the content of what the code equals and so now the cell is just a number?

    I hope I explained what I wanted clear enough. It would seem I am asking for some sort of cell memory because I want to keep this as one page, to fit on an 8.5x11 sheet of paper if I need to print this.

  2. #2
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Lock contents in a cell referenced from another cell

    Indeed there is.

    Please Login or Register  to view this content.
    That code doesn't lock the cell, it just replaces the formula with the value. It operates just like highlighting the cell's contents in the formula bar and pressing the F9 key
    Last edited by mshale; 09-10-2012 at 02:51 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1