Giter Club home page Giter Club logo

tallysalesreportgsheet's Introduction

Sales Tallier for G Sheets Wizard

Sales Report Tally System with Google Sheets

Access the system! https://docs.google.com/spreadsheets/d/1zUsfln_8zvVRlsMNUL08lQHyxXND5pm6q1YplBW_nb8/edit?usp=sharing

Documentation

How to make a copy of the system

1. First, go to file and click on make a copy.

Screen Shot 2023-02-26 at 10 51 56 PM

2. You’ll see this pop-up, then just click on make a copy (this makes a copy of the Google Sheets as well as the code automatically).

Screen Shot 2023-02-26 at 10 51 47 PM

3. After making a copy, when you click on any of the “add tally” or “subtract tally” buttons, it shows an “Authorization Required” pop-up. Click continue and click on your Google Account.

Screen Shot 2023-02-26 at 10 52 42 PM

4. Now, click on advanced and click on “Go to Untitled project”.

Screen Shot 2023-02-26 at 10 54 22 PM

Screen Shot 2023-02-27 at 1 43 57 PM

Screen Shot 2023-02-26 at 10 56 51 PM

And that’s it!

How the code works:

You don't need to do anything to make the code work, as when you copy the spreadsheet the code is already copied (if you follow the documentation). However, if you want to understand how this works or edit it, feel free to look at this section :)

Essentially, how this works is that there are functions, that when executed, increase or decrease the value of a number by one (depending if it's add or subtract tally).

Each button is assigned to a specific function depending on the cell positions of the tallies they are editing.

For example in the following code blocks below, the function add1 adds the tally at the position of cell C4, while the function of subtract4 subtracts the tally at position of cell C25.

(Credits to Shreyas Kapur on stackoverflow for reference regarding the code to add values (https://stackoverflow.com/a/32816451)

  SpreadsheetApp.getActiveSheet().getRange('C4').setValue(SpreadsheetApp.getActiveSheet().getRange('C4').getValue() + 1);
}
function subtract4() {
  SpreadsheetApp.getActiveSheet().getRange('C25').setValue(SpreadsheetApp.getActiveSheet().getRange('C25').getValue() - 1);
}

Note: This method is editing specified rows, so let's say if you have many more rows and you want to make it automatic that each button modifies its own rows without adding even more code, you can check out this answer at stackoverflow (https://stackoverflow.com/a/64976479)

If you want to further edit the code to your own liking, you can edit it via the apps script tab in Google Sheets!

Screen Shot 2023-02-26 at 11 00 54 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.