Your first step would be to create a menu to run your function in the spreadsheet. You can find docs and sample code here: https://developers.google.com/apps-script/guides/menus?hl=en
Next, you can use just a few methods to accomplish this task (replacing formulas with their result or "values only").
You need the getActiveRange method, the getValues method, and setValues method. Since the getValues method does not copy formulas, you can just set the result right back to your active range. Documentation for these methods here: SpreadsheetApp
You could hard code in a range that includes the 8 cells below, but in this function it just uses the highlighted range of cells which is more intuitive (I think) and more versatile.
Your code might look like this:
function onOpen() {
var ui = SpreadsheetApp.getUi();
// Or DocumentApp or FormApp.
ui.createMenu('Custom Menu')
.addItem('Values Only', 'valuesOnlyFunction')
.addToUi();
}
function valuesOnlyFunction() {
var activeRange = SpreadsheetApp.getActiveRange();
var activeRangeArr = activeRange.getValues();
activeRange.setValues(activeRangeArr);
}
onEdit()function trigger that would run when the user updated the cell. Your question is to general, and does not adhere to the stackoverflow rules. You're supposed to post code of what you have tried. - Alan Wells