Google Sheets blank for new visitors?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I am trying to create an ordinary Google Sheets spreadsheet available to any user, with row/column headers, users enter their numerical data in columns in an editable area (B2:C8), and at the bottom of the columns there are several cells with formulas that use the numerical values entered by users to calculate a value. I am having two problems:



  • one formulas require the sum of differences between two columns [(C2-B2)+(C3-B3)+C4-B4)…] and this sum must be divided by 7. I could not find a way to implement this calculation in one cell;


  • if the sheet is accessed by an user the editable area should be blank so that the user enters his data without having to erase first the data entered by a previous user.


How can I make the editable area of the sheet blank for a visitor?










share|improve this question
























  • can you please explain more about your issue with code or errors.

    – Ashish Kamble
    Nov 15 '18 at 9:36






  • 1





    Here is the sheet I am working on: docs.google.com/spreadsheets/d/… - range B2:H8 should be blank (no numbers in the cells) when somebody visits the sheet. I do not know how to do it! - for the second issue I have to sum up the difference between two columns, =SUM(C2-B2)+(C3-B3)+(C4-B4)+(C5-B5)+(C6:B6)+(C7-B7)+(C8-B8), then divide the result by 7 (because there are 7 rows) and display the result in one cell. Again, I do not know how to do it! Thank you!

    – Felix
    Nov 15 '18 at 17:52











  • @Felix I can see this can be an important spreadsheet. Are you conducting a survey? Do you plan to recover the data from the spreadsheets and aggregate it.

    – Tedinoz
    Nov 16 '18 at 3:05











  • Tedinoz - Not actually a survey and I do not plan (or know) to recover the data from the spreadsheet. This a spreadsheet that allows people with diabetes on self monitoring of the blood glucose (finger pricking) to calculate some indices to figure out the glycemia variability (and how stable their diabetes is) from their daily glycemia readings (at least seven readings per day).

    – Felix
    Nov 16 '18 at 8:07






  • 1





    @Felix Thank for clarifying the use of the spreadsheet - unfortunately it makes things more complicated. I am concerned about how to distribute your spreadsheet. It looks like you want your spreadsheet to be like a template but this is easier said than done. In addition, the spreadsheet is to be "available to any user" but later you refer to a "visitor" - you haven't defined what you understand by "user/visitor". For example, is a "user" only a person who has their own Google account, or is it anyone who can access the internet to share your spreadsheet?

    – Tedinoz
    Nov 16 '18 at 11:55

















2















I am trying to create an ordinary Google Sheets spreadsheet available to any user, with row/column headers, users enter their numerical data in columns in an editable area (B2:C8), and at the bottom of the columns there are several cells with formulas that use the numerical values entered by users to calculate a value. I am having two problems:



  • one formulas require the sum of differences between two columns [(C2-B2)+(C3-B3)+C4-B4)…] and this sum must be divided by 7. I could not find a way to implement this calculation in one cell;


  • if the sheet is accessed by an user the editable area should be blank so that the user enters his data without having to erase first the data entered by a previous user.


How can I make the editable area of the sheet blank for a visitor?










share|improve this question
























  • can you please explain more about your issue with code or errors.

    – Ashish Kamble
    Nov 15 '18 at 9:36






  • 1





    Here is the sheet I am working on: docs.google.com/spreadsheets/d/… - range B2:H8 should be blank (no numbers in the cells) when somebody visits the sheet. I do not know how to do it! - for the second issue I have to sum up the difference between two columns, =SUM(C2-B2)+(C3-B3)+(C4-B4)+(C5-B5)+(C6:B6)+(C7-B7)+(C8-B8), then divide the result by 7 (because there are 7 rows) and display the result in one cell. Again, I do not know how to do it! Thank you!

    – Felix
    Nov 15 '18 at 17:52











  • @Felix I can see this can be an important spreadsheet. Are you conducting a survey? Do you plan to recover the data from the spreadsheets and aggregate it.

    – Tedinoz
    Nov 16 '18 at 3:05











  • Tedinoz - Not actually a survey and I do not plan (or know) to recover the data from the spreadsheet. This a spreadsheet that allows people with diabetes on self monitoring of the blood glucose (finger pricking) to calculate some indices to figure out the glycemia variability (and how stable their diabetes is) from their daily glycemia readings (at least seven readings per day).

    – Felix
    Nov 16 '18 at 8:07






  • 1





    @Felix Thank for clarifying the use of the spreadsheet - unfortunately it makes things more complicated. I am concerned about how to distribute your spreadsheet. It looks like you want your spreadsheet to be like a template but this is easier said than done. In addition, the spreadsheet is to be "available to any user" but later you refer to a "visitor" - you haven't defined what you understand by "user/visitor". For example, is a "user" only a person who has their own Google account, or is it anyone who can access the internet to share your spreadsheet?

    – Tedinoz
    Nov 16 '18 at 11:55













2












2








2


1






I am trying to create an ordinary Google Sheets spreadsheet available to any user, with row/column headers, users enter their numerical data in columns in an editable area (B2:C8), and at the bottom of the columns there are several cells with formulas that use the numerical values entered by users to calculate a value. I am having two problems:



  • one formulas require the sum of differences between two columns [(C2-B2)+(C3-B3)+C4-B4)…] and this sum must be divided by 7. I could not find a way to implement this calculation in one cell;


  • if the sheet is accessed by an user the editable area should be blank so that the user enters his data without having to erase first the data entered by a previous user.


How can I make the editable area of the sheet blank for a visitor?










share|improve this question
















I am trying to create an ordinary Google Sheets spreadsheet available to any user, with row/column headers, users enter their numerical data in columns in an editable area (B2:C8), and at the bottom of the columns there are several cells with formulas that use the numerical values entered by users to calculate a value. I am having two problems:



  • one formulas require the sum of differences between two columns [(C2-B2)+(C3-B3)+C4-B4)…] and this sum must be divided by 7. I could not find a way to implement this calculation in one cell;


  • if the sheet is accessed by an user the editable area should be blank so that the user enters his data without having to erase first the data entered by a previous user.


How can I make the editable area of the sheet blank for a visitor?







google-sheets






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 10:43









Billal Begueradj

6,058132950




6,058132950










asked Nov 15 '18 at 9:13









FelixFelix

141




141












  • can you please explain more about your issue with code or errors.

    – Ashish Kamble
    Nov 15 '18 at 9:36






  • 1





    Here is the sheet I am working on: docs.google.com/spreadsheets/d/… - range B2:H8 should be blank (no numbers in the cells) when somebody visits the sheet. I do not know how to do it! - for the second issue I have to sum up the difference between two columns, =SUM(C2-B2)+(C3-B3)+(C4-B4)+(C5-B5)+(C6:B6)+(C7-B7)+(C8-B8), then divide the result by 7 (because there are 7 rows) and display the result in one cell. Again, I do not know how to do it! Thank you!

    – Felix
    Nov 15 '18 at 17:52











  • @Felix I can see this can be an important spreadsheet. Are you conducting a survey? Do you plan to recover the data from the spreadsheets and aggregate it.

    – Tedinoz
    Nov 16 '18 at 3:05











  • Tedinoz - Not actually a survey and I do not plan (or know) to recover the data from the spreadsheet. This a spreadsheet that allows people with diabetes on self monitoring of the blood glucose (finger pricking) to calculate some indices to figure out the glycemia variability (and how stable their diabetes is) from their daily glycemia readings (at least seven readings per day).

    – Felix
    Nov 16 '18 at 8:07






  • 1





    @Felix Thank for clarifying the use of the spreadsheet - unfortunately it makes things more complicated. I am concerned about how to distribute your spreadsheet. It looks like you want your spreadsheet to be like a template but this is easier said than done. In addition, the spreadsheet is to be "available to any user" but later you refer to a "visitor" - you haven't defined what you understand by "user/visitor". For example, is a "user" only a person who has their own Google account, or is it anyone who can access the internet to share your spreadsheet?

    – Tedinoz
    Nov 16 '18 at 11:55

















  • can you please explain more about your issue with code or errors.

    – Ashish Kamble
    Nov 15 '18 at 9:36






  • 1





    Here is the sheet I am working on: docs.google.com/spreadsheets/d/… - range B2:H8 should be blank (no numbers in the cells) when somebody visits the sheet. I do not know how to do it! - for the second issue I have to sum up the difference between two columns, =SUM(C2-B2)+(C3-B3)+(C4-B4)+(C5-B5)+(C6:B6)+(C7-B7)+(C8-B8), then divide the result by 7 (because there are 7 rows) and display the result in one cell. Again, I do not know how to do it! Thank you!

    – Felix
    Nov 15 '18 at 17:52











  • @Felix I can see this can be an important spreadsheet. Are you conducting a survey? Do you plan to recover the data from the spreadsheets and aggregate it.

    – Tedinoz
    Nov 16 '18 at 3:05











  • Tedinoz - Not actually a survey and I do not plan (or know) to recover the data from the spreadsheet. This a spreadsheet that allows people with diabetes on self monitoring of the blood glucose (finger pricking) to calculate some indices to figure out the glycemia variability (and how stable their diabetes is) from their daily glycemia readings (at least seven readings per day).

    – Felix
    Nov 16 '18 at 8:07






  • 1





    @Felix Thank for clarifying the use of the spreadsheet - unfortunately it makes things more complicated. I am concerned about how to distribute your spreadsheet. It looks like you want your spreadsheet to be like a template but this is easier said than done. In addition, the spreadsheet is to be "available to any user" but later you refer to a "visitor" - you haven't defined what you understand by "user/visitor". For example, is a "user" only a person who has their own Google account, or is it anyone who can access the internet to share your spreadsheet?

    – Tedinoz
    Nov 16 '18 at 11:55
















can you please explain more about your issue with code or errors.

– Ashish Kamble
Nov 15 '18 at 9:36





can you please explain more about your issue with code or errors.

– Ashish Kamble
Nov 15 '18 at 9:36




1




1





Here is the sheet I am working on: docs.google.com/spreadsheets/d/… - range B2:H8 should be blank (no numbers in the cells) when somebody visits the sheet. I do not know how to do it! - for the second issue I have to sum up the difference between two columns, =SUM(C2-B2)+(C3-B3)+(C4-B4)+(C5-B5)+(C6:B6)+(C7-B7)+(C8-B8), then divide the result by 7 (because there are 7 rows) and display the result in one cell. Again, I do not know how to do it! Thank you!

– Felix
Nov 15 '18 at 17:52





Here is the sheet I am working on: docs.google.com/spreadsheets/d/… - range B2:H8 should be blank (no numbers in the cells) when somebody visits the sheet. I do not know how to do it! - for the second issue I have to sum up the difference between two columns, =SUM(C2-B2)+(C3-B3)+(C4-B4)+(C5-B5)+(C6:B6)+(C7-B7)+(C8-B8), then divide the result by 7 (because there are 7 rows) and display the result in one cell. Again, I do not know how to do it! Thank you!

– Felix
Nov 15 '18 at 17:52













@Felix I can see this can be an important spreadsheet. Are you conducting a survey? Do you plan to recover the data from the spreadsheets and aggregate it.

– Tedinoz
Nov 16 '18 at 3:05





@Felix I can see this can be an important spreadsheet. Are you conducting a survey? Do you plan to recover the data from the spreadsheets and aggregate it.

– Tedinoz
Nov 16 '18 at 3:05













Tedinoz - Not actually a survey and I do not plan (or know) to recover the data from the spreadsheet. This a spreadsheet that allows people with diabetes on self monitoring of the blood glucose (finger pricking) to calculate some indices to figure out the glycemia variability (and how stable their diabetes is) from their daily glycemia readings (at least seven readings per day).

– Felix
Nov 16 '18 at 8:07





Tedinoz - Not actually a survey and I do not plan (or know) to recover the data from the spreadsheet. This a spreadsheet that allows people with diabetes on self monitoring of the blood glucose (finger pricking) to calculate some indices to figure out the glycemia variability (and how stable their diabetes is) from their daily glycemia readings (at least seven readings per day).

– Felix
Nov 16 '18 at 8:07




1




1





@Felix Thank for clarifying the use of the spreadsheet - unfortunately it makes things more complicated. I am concerned about how to distribute your spreadsheet. It looks like you want your spreadsheet to be like a template but this is easier said than done. In addition, the spreadsheet is to be "available to any user" but later you refer to a "visitor" - you haven't defined what you understand by "user/visitor". For example, is a "user" only a person who has their own Google account, or is it anyone who can access the internet to share your spreadsheet?

– Tedinoz
Nov 16 '18 at 11:55





@Felix Thank for clarifying the use of the spreadsheet - unfortunately it makes things more complicated. I am concerned about how to distribute your spreadsheet. It looks like you want your spreadsheet to be like a template but this is easier said than done. In addition, the spreadsheet is to be "available to any user" but later you refer to a "visitor" - you haven't defined what you understand by "user/visitor". For example, is a "user" only a person who has their own Google account, or is it anyone who can access the internet to share your spreadsheet?

– Tedinoz
Nov 16 '18 at 11:55












3 Answers
3






active

oldest

votes


















1














re:




I could not find a way to implement this calculation in one cell;




Maybe:



=(SUM(C2:C)-SUM(B2:B))/7


For example:



SO53315931 example






share|improve this answer

























  • It will return value of 39.57 rather it should be -40.86

    – Ashish Kamble
    Nov 16 '18 at 4:52











  • Yes it works now, Do automated scripts will erase cell data, i think so.

    – Ashish Kamble
    Nov 16 '18 at 5:17



















1














I can find solution for Sum and divide logic



=SUM(C2-B2,C3-B3,C4-B4,C5-B5,C6-B6,C7-B7,C8-B8)/7


Sum is -286
after Div by 7 will be -40.86



Yes there is a way to make your row clear but not for new visitor but for Time basis.

You can Try Automation script for that,

Read How do I create an Auto-Clear Script in a Google Spreadsheet?



1)Go to https://script.google.com and then add a New Script

2) Use I checked this Working for me,



function myFunction() 
var sheetActive = SpreadsheetApp.openById("1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw").getSheetByName("Indici");
sheetActive.getRange('B2:H2').clearContent();



3) Goto Run & select Run function and then select clearRange.

4) Goto Edit, Select 'current project triggers'

5) add trigger

6) time driven minutes every 5 minutes run this script automatically.

7) In All your triggers popup windows, select clearRange as the Run function.






share|improve this answer




















  • 1





    With respect, your answer does not address the issue of making the spreadsheet available to others. First, there is no predictability about the timing of a new user opening the spreadsheet; every 5 minutes may be insufficient. Second, until a user makes a copy of the spreadsheet (however this might be triggered, if at all) any data entry will be promptly erased by the Auto-Clear script. Third, the Auto-Clear script will function ad-infinitum, though it will fail as soon as the spreadsheet obtains a new ID. There is also the matter of how to protect the calculation (and some other) fields.

    – Tedinoz
    Nov 16 '18 at 12:14







  • 1





    Ashish, your solution for sum and divide in the same cell is correct. I double checked it manually and it works. Thank you.

    – Felix
    Nov 16 '18 at 19:55


















0














Ensuring that the data entry area will be "blank for the next visitor" is an important consideration. The spreadsheet is to be used/accessed freely, anonymously with complete privacy, by an unknown number of people. The users do not necessarily share a common understanding about the sharing of spreadsheets, and some users may or may not immediately understand or comprehend the on-going implications of how to use, access and copy the spreadsheet. Ideally the spreadsheet could be distributed as a "template". But this is not an option for users of the free Google Docs service.



In short, it is unsafe to delegate the process of creating a copy of the spreadsheet. There's also the matter of protecting the questioner's integrity by ensuring that no end-user can ever accidentally access or delete the data of another person. For these reasons, the spreadsheet should never be directly accessed or opened by an end-user.



The solution is let Google create the copy of the spreadsheet. The "normal" shared spreadsheet url ends with /edit (even if a user has "View only" access). Manually substitute /copy for /edit to change the url like this:

Copy url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy

Edit url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/edit



When the url is accessed, the end-user will first see this screen. Note that the original document name ("Indici_diabetici") is shown.




Google copy document




By clicking "Make a Copy", Google creates a copy of the spreadsheet. The copy has a new ID, the user becomes its "owner" and it is saved in the user's own Drive account.



The original spreadsheet should be shared for "View only" access; this will ensure that if an inquisitive user were to change the url back to /edit they would be unable to change or modify the original spreadsheet.



The questioner would most likely include some appropriate explanatory information on the first sheet of the spreadsheet, so the end-user will still have guidance about the purpose and use of the spreadsheet.



To simplify access and avoid confusion, I would suggest that the actual url should be published only as a web link. Something along these lines: Want a copy of this template?






share|improve this answer

























  • Tedinoz - thank you for your extensive comment, I modified the URL as you suggested but it redirects me to google login page!

    – Felix
    Nov 17 '18 at 19:23











  • @Felix The examples in my answer (plain text and the link at the bottom) are both using your own spreadsheets URL. What URL did you come up with?

    – Tedinoz
    Nov 17 '18 at 19:30











  • When I am legged into my google account the url of the spreadsheet is docs.google.com/spreadsheets/d/…

    – Felix
    Nov 19 '18 at 10:23











  • when I log out either url docs.google.com/spreadsheets/d/… or docs.google.com/spreadsheets/d/… sends me to the google login page.

    – Felix
    Nov 19 '18 at 10:24











  • @Felix This is the correct url: https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy. To access and use the spreadsheet (enter data, save the file, etc), a user needs a Google account. You were logged out, so Google took you to a login page, and then it would have let you make a copy of the sheet. FWIW, "View only" access doesn't require a Google account, but "View only" would be useless in this case.

    – Tedinoz
    Nov 19 '18 at 11:04












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53315931%2fgoogle-sheets-blank-for-new-visitors%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














re:




I could not find a way to implement this calculation in one cell;




Maybe:



=(SUM(C2:C)-SUM(B2:B))/7


For example:



SO53315931 example






share|improve this answer

























  • It will return value of 39.57 rather it should be -40.86

    – Ashish Kamble
    Nov 16 '18 at 4:52











  • Yes it works now, Do automated scripts will erase cell data, i think so.

    – Ashish Kamble
    Nov 16 '18 at 5:17
















1














re:




I could not find a way to implement this calculation in one cell;




Maybe:



=(SUM(C2:C)-SUM(B2:B))/7


For example:



SO53315931 example






share|improve this answer

























  • It will return value of 39.57 rather it should be -40.86

    – Ashish Kamble
    Nov 16 '18 at 4:52











  • Yes it works now, Do automated scripts will erase cell data, i think so.

    – Ashish Kamble
    Nov 16 '18 at 5:17














1












1








1







re:




I could not find a way to implement this calculation in one cell;




Maybe:



=(SUM(C2:C)-SUM(B2:B))/7


For example:



SO53315931 example






share|improve this answer















re:




I could not find a way to implement this calculation in one cell;




Maybe:



=(SUM(C2:C)-SUM(B2:B))/7


For example:



SO53315931 example







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 16 '18 at 5:06

























answered Nov 15 '18 at 14:12









pnutspnuts

49.2k764101




49.2k764101












  • It will return value of 39.57 rather it should be -40.86

    – Ashish Kamble
    Nov 16 '18 at 4:52











  • Yes it works now, Do automated scripts will erase cell data, i think so.

    – Ashish Kamble
    Nov 16 '18 at 5:17


















  • It will return value of 39.57 rather it should be -40.86

    – Ashish Kamble
    Nov 16 '18 at 4:52











  • Yes it works now, Do automated scripts will erase cell data, i think so.

    – Ashish Kamble
    Nov 16 '18 at 5:17

















It will return value of 39.57 rather it should be -40.86

– Ashish Kamble
Nov 16 '18 at 4:52





It will return value of 39.57 rather it should be -40.86

– Ashish Kamble
Nov 16 '18 at 4:52













Yes it works now, Do automated scripts will erase cell data, i think so.

– Ashish Kamble
Nov 16 '18 at 5:17






Yes it works now, Do automated scripts will erase cell data, i think so.

– Ashish Kamble
Nov 16 '18 at 5:17














1














I can find solution for Sum and divide logic



=SUM(C2-B2,C3-B3,C4-B4,C5-B5,C6-B6,C7-B7,C8-B8)/7


Sum is -286
after Div by 7 will be -40.86



Yes there is a way to make your row clear but not for new visitor but for Time basis.

You can Try Automation script for that,

Read How do I create an Auto-Clear Script in a Google Spreadsheet?



1)Go to https://script.google.com and then add a New Script

2) Use I checked this Working for me,



function myFunction() 
var sheetActive = SpreadsheetApp.openById("1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw").getSheetByName("Indici");
sheetActive.getRange('B2:H2').clearContent();



3) Goto Run & select Run function and then select clearRange.

4) Goto Edit, Select 'current project triggers'

5) add trigger

6) time driven minutes every 5 minutes run this script automatically.

7) In All your triggers popup windows, select clearRange as the Run function.






share|improve this answer




















  • 1





    With respect, your answer does not address the issue of making the spreadsheet available to others. First, there is no predictability about the timing of a new user opening the spreadsheet; every 5 minutes may be insufficient. Second, until a user makes a copy of the spreadsheet (however this might be triggered, if at all) any data entry will be promptly erased by the Auto-Clear script. Third, the Auto-Clear script will function ad-infinitum, though it will fail as soon as the spreadsheet obtains a new ID. There is also the matter of how to protect the calculation (and some other) fields.

    – Tedinoz
    Nov 16 '18 at 12:14







  • 1





    Ashish, your solution for sum and divide in the same cell is correct. I double checked it manually and it works. Thank you.

    – Felix
    Nov 16 '18 at 19:55















1














I can find solution for Sum and divide logic



=SUM(C2-B2,C3-B3,C4-B4,C5-B5,C6-B6,C7-B7,C8-B8)/7


Sum is -286
after Div by 7 will be -40.86



Yes there is a way to make your row clear but not for new visitor but for Time basis.

You can Try Automation script for that,

Read How do I create an Auto-Clear Script in a Google Spreadsheet?



1)Go to https://script.google.com and then add a New Script

2) Use I checked this Working for me,



function myFunction() 
var sheetActive = SpreadsheetApp.openById("1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw").getSheetByName("Indici");
sheetActive.getRange('B2:H2').clearContent();



3) Goto Run & select Run function and then select clearRange.

4) Goto Edit, Select 'current project triggers'

5) add trigger

6) time driven minutes every 5 minutes run this script automatically.

7) In All your triggers popup windows, select clearRange as the Run function.






share|improve this answer




















  • 1





    With respect, your answer does not address the issue of making the spreadsheet available to others. First, there is no predictability about the timing of a new user opening the spreadsheet; every 5 minutes may be insufficient. Second, until a user makes a copy of the spreadsheet (however this might be triggered, if at all) any data entry will be promptly erased by the Auto-Clear script. Third, the Auto-Clear script will function ad-infinitum, though it will fail as soon as the spreadsheet obtains a new ID. There is also the matter of how to protect the calculation (and some other) fields.

    – Tedinoz
    Nov 16 '18 at 12:14







  • 1





    Ashish, your solution for sum and divide in the same cell is correct. I double checked it manually and it works. Thank you.

    – Felix
    Nov 16 '18 at 19:55













1












1








1







I can find solution for Sum and divide logic



=SUM(C2-B2,C3-B3,C4-B4,C5-B5,C6-B6,C7-B7,C8-B8)/7


Sum is -286
after Div by 7 will be -40.86



Yes there is a way to make your row clear but not for new visitor but for Time basis.

You can Try Automation script for that,

Read How do I create an Auto-Clear Script in a Google Spreadsheet?



1)Go to https://script.google.com and then add a New Script

2) Use I checked this Working for me,



function myFunction() 
var sheetActive = SpreadsheetApp.openById("1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw").getSheetByName("Indici");
sheetActive.getRange('B2:H2').clearContent();



3) Goto Run & select Run function and then select clearRange.

4) Goto Edit, Select 'current project triggers'

5) add trigger

6) time driven minutes every 5 minutes run this script automatically.

7) In All your triggers popup windows, select clearRange as the Run function.






share|improve this answer















I can find solution for Sum and divide logic



=SUM(C2-B2,C3-B3,C4-B4,C5-B5,C6-B6,C7-B7,C8-B8)/7


Sum is -286
after Div by 7 will be -40.86



Yes there is a way to make your row clear but not for new visitor but for Time basis.

You can Try Automation script for that,

Read How do I create an Auto-Clear Script in a Google Spreadsheet?



1)Go to https://script.google.com and then add a New Script

2) Use I checked this Working for me,



function myFunction() 
var sheetActive = SpreadsheetApp.openById("1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw").getSheetByName("Indici");
sheetActive.getRange('B2:H2').clearContent();



3) Goto Run & select Run function and then select clearRange.

4) Goto Edit, Select 'current project triggers'

5) add trigger

6) time driven minutes every 5 minutes run this script automatically.

7) In All your triggers popup windows, select clearRange as the Run function.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 16 '18 at 5:11

























answered Nov 16 '18 at 4:50









Ashish KambleAshish Kamble

729620




729620







  • 1





    With respect, your answer does not address the issue of making the spreadsheet available to others. First, there is no predictability about the timing of a new user opening the spreadsheet; every 5 minutes may be insufficient. Second, until a user makes a copy of the spreadsheet (however this might be triggered, if at all) any data entry will be promptly erased by the Auto-Clear script. Third, the Auto-Clear script will function ad-infinitum, though it will fail as soon as the spreadsheet obtains a new ID. There is also the matter of how to protect the calculation (and some other) fields.

    – Tedinoz
    Nov 16 '18 at 12:14







  • 1





    Ashish, your solution for sum and divide in the same cell is correct. I double checked it manually and it works. Thank you.

    – Felix
    Nov 16 '18 at 19:55












  • 1





    With respect, your answer does not address the issue of making the spreadsheet available to others. First, there is no predictability about the timing of a new user opening the spreadsheet; every 5 minutes may be insufficient. Second, until a user makes a copy of the spreadsheet (however this might be triggered, if at all) any data entry will be promptly erased by the Auto-Clear script. Third, the Auto-Clear script will function ad-infinitum, though it will fail as soon as the spreadsheet obtains a new ID. There is also the matter of how to protect the calculation (and some other) fields.

    – Tedinoz
    Nov 16 '18 at 12:14







  • 1





    Ashish, your solution for sum and divide in the same cell is correct. I double checked it manually and it works. Thank you.

    – Felix
    Nov 16 '18 at 19:55







1




1





With respect, your answer does not address the issue of making the spreadsheet available to others. First, there is no predictability about the timing of a new user opening the spreadsheet; every 5 minutes may be insufficient. Second, until a user makes a copy of the spreadsheet (however this might be triggered, if at all) any data entry will be promptly erased by the Auto-Clear script. Third, the Auto-Clear script will function ad-infinitum, though it will fail as soon as the spreadsheet obtains a new ID. There is also the matter of how to protect the calculation (and some other) fields.

– Tedinoz
Nov 16 '18 at 12:14






With respect, your answer does not address the issue of making the spreadsheet available to others. First, there is no predictability about the timing of a new user opening the spreadsheet; every 5 minutes may be insufficient. Second, until a user makes a copy of the spreadsheet (however this might be triggered, if at all) any data entry will be promptly erased by the Auto-Clear script. Third, the Auto-Clear script will function ad-infinitum, though it will fail as soon as the spreadsheet obtains a new ID. There is also the matter of how to protect the calculation (and some other) fields.

– Tedinoz
Nov 16 '18 at 12:14





1




1





Ashish, your solution for sum and divide in the same cell is correct. I double checked it manually and it works. Thank you.

– Felix
Nov 16 '18 at 19:55





Ashish, your solution for sum and divide in the same cell is correct. I double checked it manually and it works. Thank you.

– Felix
Nov 16 '18 at 19:55











0














Ensuring that the data entry area will be "blank for the next visitor" is an important consideration. The spreadsheet is to be used/accessed freely, anonymously with complete privacy, by an unknown number of people. The users do not necessarily share a common understanding about the sharing of spreadsheets, and some users may or may not immediately understand or comprehend the on-going implications of how to use, access and copy the spreadsheet. Ideally the spreadsheet could be distributed as a "template". But this is not an option for users of the free Google Docs service.



In short, it is unsafe to delegate the process of creating a copy of the spreadsheet. There's also the matter of protecting the questioner's integrity by ensuring that no end-user can ever accidentally access or delete the data of another person. For these reasons, the spreadsheet should never be directly accessed or opened by an end-user.



The solution is let Google create the copy of the spreadsheet. The "normal" shared spreadsheet url ends with /edit (even if a user has "View only" access). Manually substitute /copy for /edit to change the url like this:

Copy url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy

Edit url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/edit



When the url is accessed, the end-user will first see this screen. Note that the original document name ("Indici_diabetici") is shown.




Google copy document




By clicking "Make a Copy", Google creates a copy of the spreadsheet. The copy has a new ID, the user becomes its "owner" and it is saved in the user's own Drive account.



The original spreadsheet should be shared for "View only" access; this will ensure that if an inquisitive user were to change the url back to /edit they would be unable to change or modify the original spreadsheet.



The questioner would most likely include some appropriate explanatory information on the first sheet of the spreadsheet, so the end-user will still have guidance about the purpose and use of the spreadsheet.



To simplify access and avoid confusion, I would suggest that the actual url should be published only as a web link. Something along these lines: Want a copy of this template?






share|improve this answer

























  • Tedinoz - thank you for your extensive comment, I modified the URL as you suggested but it redirects me to google login page!

    – Felix
    Nov 17 '18 at 19:23











  • @Felix The examples in my answer (plain text and the link at the bottom) are both using your own spreadsheets URL. What URL did you come up with?

    – Tedinoz
    Nov 17 '18 at 19:30











  • When I am legged into my google account the url of the spreadsheet is docs.google.com/spreadsheets/d/…

    – Felix
    Nov 19 '18 at 10:23











  • when I log out either url docs.google.com/spreadsheets/d/… or docs.google.com/spreadsheets/d/… sends me to the google login page.

    – Felix
    Nov 19 '18 at 10:24











  • @Felix This is the correct url: https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy. To access and use the spreadsheet (enter data, save the file, etc), a user needs a Google account. You were logged out, so Google took you to a login page, and then it would have let you make a copy of the sheet. FWIW, "View only" access doesn't require a Google account, but "View only" would be useless in this case.

    – Tedinoz
    Nov 19 '18 at 11:04
















0














Ensuring that the data entry area will be "blank for the next visitor" is an important consideration. The spreadsheet is to be used/accessed freely, anonymously with complete privacy, by an unknown number of people. The users do not necessarily share a common understanding about the sharing of spreadsheets, and some users may or may not immediately understand or comprehend the on-going implications of how to use, access and copy the spreadsheet. Ideally the spreadsheet could be distributed as a "template". But this is not an option for users of the free Google Docs service.



In short, it is unsafe to delegate the process of creating a copy of the spreadsheet. There's also the matter of protecting the questioner's integrity by ensuring that no end-user can ever accidentally access or delete the data of another person. For these reasons, the spreadsheet should never be directly accessed or opened by an end-user.



The solution is let Google create the copy of the spreadsheet. The "normal" shared spreadsheet url ends with /edit (even if a user has "View only" access). Manually substitute /copy for /edit to change the url like this:

Copy url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy

Edit url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/edit



When the url is accessed, the end-user will first see this screen. Note that the original document name ("Indici_diabetici") is shown.




Google copy document




By clicking "Make a Copy", Google creates a copy of the spreadsheet. The copy has a new ID, the user becomes its "owner" and it is saved in the user's own Drive account.



The original spreadsheet should be shared for "View only" access; this will ensure that if an inquisitive user were to change the url back to /edit they would be unable to change or modify the original spreadsheet.



The questioner would most likely include some appropriate explanatory information on the first sheet of the spreadsheet, so the end-user will still have guidance about the purpose and use of the spreadsheet.



To simplify access and avoid confusion, I would suggest that the actual url should be published only as a web link. Something along these lines: Want a copy of this template?






share|improve this answer

























  • Tedinoz - thank you for your extensive comment, I modified the URL as you suggested but it redirects me to google login page!

    – Felix
    Nov 17 '18 at 19:23











  • @Felix The examples in my answer (plain text and the link at the bottom) are both using your own spreadsheets URL. What URL did you come up with?

    – Tedinoz
    Nov 17 '18 at 19:30











  • When I am legged into my google account the url of the spreadsheet is docs.google.com/spreadsheets/d/…

    – Felix
    Nov 19 '18 at 10:23











  • when I log out either url docs.google.com/spreadsheets/d/… or docs.google.com/spreadsheets/d/… sends me to the google login page.

    – Felix
    Nov 19 '18 at 10:24











  • @Felix This is the correct url: https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy. To access and use the spreadsheet (enter data, save the file, etc), a user needs a Google account. You were logged out, so Google took you to a login page, and then it would have let you make a copy of the sheet. FWIW, "View only" access doesn't require a Google account, but "View only" would be useless in this case.

    – Tedinoz
    Nov 19 '18 at 11:04














0












0








0







Ensuring that the data entry area will be "blank for the next visitor" is an important consideration. The spreadsheet is to be used/accessed freely, anonymously with complete privacy, by an unknown number of people. The users do not necessarily share a common understanding about the sharing of spreadsheets, and some users may or may not immediately understand or comprehend the on-going implications of how to use, access and copy the spreadsheet. Ideally the spreadsheet could be distributed as a "template". But this is not an option for users of the free Google Docs service.



In short, it is unsafe to delegate the process of creating a copy of the spreadsheet. There's also the matter of protecting the questioner's integrity by ensuring that no end-user can ever accidentally access or delete the data of another person. For these reasons, the spreadsheet should never be directly accessed or opened by an end-user.



The solution is let Google create the copy of the spreadsheet. The "normal" shared spreadsheet url ends with /edit (even if a user has "View only" access). Manually substitute /copy for /edit to change the url like this:

Copy url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy

Edit url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/edit



When the url is accessed, the end-user will first see this screen. Note that the original document name ("Indici_diabetici") is shown.




Google copy document




By clicking "Make a Copy", Google creates a copy of the spreadsheet. The copy has a new ID, the user becomes its "owner" and it is saved in the user's own Drive account.



The original spreadsheet should be shared for "View only" access; this will ensure that if an inquisitive user were to change the url back to /edit they would be unable to change or modify the original spreadsheet.



The questioner would most likely include some appropriate explanatory information on the first sheet of the spreadsheet, so the end-user will still have guidance about the purpose and use of the spreadsheet.



To simplify access and avoid confusion, I would suggest that the actual url should be published only as a web link. Something along these lines: Want a copy of this template?






share|improve this answer















Ensuring that the data entry area will be "blank for the next visitor" is an important consideration. The spreadsheet is to be used/accessed freely, anonymously with complete privacy, by an unknown number of people. The users do not necessarily share a common understanding about the sharing of spreadsheets, and some users may or may not immediately understand or comprehend the on-going implications of how to use, access and copy the spreadsheet. Ideally the spreadsheet could be distributed as a "template". But this is not an option for users of the free Google Docs service.



In short, it is unsafe to delegate the process of creating a copy of the spreadsheet. There's also the matter of protecting the questioner's integrity by ensuring that no end-user can ever accidentally access or delete the data of another person. For these reasons, the spreadsheet should never be directly accessed or opened by an end-user.



The solution is let Google create the copy of the spreadsheet. The "normal" shared spreadsheet url ends with /edit (even if a user has "View only" access). Manually substitute /copy for /edit to change the url like this:

Copy url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy

Edit url -> https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/edit



When the url is accessed, the end-user will first see this screen. Note that the original document name ("Indici_diabetici") is shown.




Google copy document




By clicking "Make a Copy", Google creates a copy of the spreadsheet. The copy has a new ID, the user becomes its "owner" and it is saved in the user's own Drive account.



The original spreadsheet should be shared for "View only" access; this will ensure that if an inquisitive user were to change the url back to /edit they would be unable to change or modify the original spreadsheet.



The questioner would most likely include some appropriate explanatory information on the first sheet of the spreadsheet, so the end-user will still have guidance about the purpose and use of the spreadsheet.



To simplify access and avoid confusion, I would suggest that the actual url should be published only as a web link. Something along these lines: Want a copy of this template?







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 16 '18 at 22:53

























answered Nov 16 '18 at 22:07









TedinozTedinoz

1,34721419




1,34721419












  • Tedinoz - thank you for your extensive comment, I modified the URL as you suggested but it redirects me to google login page!

    – Felix
    Nov 17 '18 at 19:23











  • @Felix The examples in my answer (plain text and the link at the bottom) are both using your own spreadsheets URL. What URL did you come up with?

    – Tedinoz
    Nov 17 '18 at 19:30











  • When I am legged into my google account the url of the spreadsheet is docs.google.com/spreadsheets/d/…

    – Felix
    Nov 19 '18 at 10:23











  • when I log out either url docs.google.com/spreadsheets/d/… or docs.google.com/spreadsheets/d/… sends me to the google login page.

    – Felix
    Nov 19 '18 at 10:24











  • @Felix This is the correct url: https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy. To access and use the spreadsheet (enter data, save the file, etc), a user needs a Google account. You were logged out, so Google took you to a login page, and then it would have let you make a copy of the sheet. FWIW, "View only" access doesn't require a Google account, but "View only" would be useless in this case.

    – Tedinoz
    Nov 19 '18 at 11:04


















  • Tedinoz - thank you for your extensive comment, I modified the URL as you suggested but it redirects me to google login page!

    – Felix
    Nov 17 '18 at 19:23











  • @Felix The examples in my answer (plain text and the link at the bottom) are both using your own spreadsheets URL. What URL did you come up with?

    – Tedinoz
    Nov 17 '18 at 19:30











  • When I am legged into my google account the url of the spreadsheet is docs.google.com/spreadsheets/d/…

    – Felix
    Nov 19 '18 at 10:23











  • when I log out either url docs.google.com/spreadsheets/d/… or docs.google.com/spreadsheets/d/… sends me to the google login page.

    – Felix
    Nov 19 '18 at 10:24











  • @Felix This is the correct url: https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy. To access and use the spreadsheet (enter data, save the file, etc), a user needs a Google account. You were logged out, so Google took you to a login page, and then it would have let you make a copy of the sheet. FWIW, "View only" access doesn't require a Google account, but "View only" would be useless in this case.

    – Tedinoz
    Nov 19 '18 at 11:04

















Tedinoz - thank you for your extensive comment, I modified the URL as you suggested but it redirects me to google login page!

– Felix
Nov 17 '18 at 19:23





Tedinoz - thank you for your extensive comment, I modified the URL as you suggested but it redirects me to google login page!

– Felix
Nov 17 '18 at 19:23













@Felix The examples in my answer (plain text and the link at the bottom) are both using your own spreadsheets URL. What URL did you come up with?

– Tedinoz
Nov 17 '18 at 19:30





@Felix The examples in my answer (plain text and the link at the bottom) are both using your own spreadsheets URL. What URL did you come up with?

– Tedinoz
Nov 17 '18 at 19:30













When I am legged into my google account the url of the spreadsheet is docs.google.com/spreadsheets/d/…

– Felix
Nov 19 '18 at 10:23





When I am legged into my google account the url of the spreadsheet is docs.google.com/spreadsheets/d/…

– Felix
Nov 19 '18 at 10:23













when I log out either url docs.google.com/spreadsheets/d/… or docs.google.com/spreadsheets/d/… sends me to the google login page.

– Felix
Nov 19 '18 at 10:24





when I log out either url docs.google.com/spreadsheets/d/… or docs.google.com/spreadsheets/d/… sends me to the google login page.

– Felix
Nov 19 '18 at 10:24













@Felix This is the correct url: https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy. To access and use the spreadsheet (enter data, save the file, etc), a user needs a Google account. You were logged out, so Google took you to a login page, and then it would have let you make a copy of the sheet. FWIW, "View only" access doesn't require a Google account, but "View only" would be useless in this case.

– Tedinoz
Nov 19 '18 at 11:04






@Felix This is the correct url: https://docs.google.com/spreadsheets/d/1Gp4_TgazhYsZmJWEsRXYtEf2XJAW0sCrsS-o4ZN3oKw/copy. To access and use the spreadsheet (enter data, save the file, etc), a user needs a Google account. You were logged out, so Google took you to a login page, and then it would have let you make a copy of the sheet. FWIW, "View only" access doesn't require a Google account, but "View only" would be useless in this case.

– Tedinoz
Nov 19 '18 at 11:04


















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53315931%2fgoogle-sheets-blank-for-new-visitors%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

Syphilis

Darth Vader #20