<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Juan Giles</title>
    <description>The latest articles on DEV Community by Juan Giles (@juangiles260).</description>
    <link>https://dev.to/juangiles260</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4178497%2F6a1be4e9-2251-459b-a55f-63488255bcd6.png</url>
      <title>DEV Community: Juan Giles</title>
      <link>https://dev.to/juangiles260</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/juangiles260"/>
    <language>en</language>
    <item>
      <title>How to Build an Inventory Tracker with Automatic Reorder Alerts in Google Sheets</title>
      <dc:creator>Juan Giles</dc:creator>
      <pubDate>Mon, 12 Oct 2026 06:18:55 +0000</pubDate>
      <link>https://dev.to/juangiles260/how-to-build-an-inventory-tracker-with-automatic-reorder-alerts-in-google-sheets-3jjk</link>
      <guid>https://dev.to/juangiles260/how-to-build-an-inventory-tracker-with-automatic-reorder-alerts-in-google-sheets-3jjk</guid>
      <description>&lt;p&gt;When I worked in the production area of a packaging plant, stock was counted by hand and we usually found out an item was missing when the line stopped. This is the spreadsheet I wish we had. It works in Excel and Google Sheets, uses only formulas, and an optional script emails you every morning.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Two tables, not one
&lt;/h2&gt;

&lt;p&gt;The mistake most people make is typing the current stock directly. Instead, keep:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An &lt;strong&gt;Inventory&lt;/strong&gt; sheet: Code, Item, Category, Unit, Opening stock, Min stock, Unit cost&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Movements&lt;/strong&gt; sheet: Date, Code, Type (IN/OUT), Quantity, Note&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every delivery or consumption is a new row in Movements. You never overwrite a number, so you always know why stock changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Stock IN and OUT with SUMIFS
&lt;/h2&gt;

&lt;p&gt;In the Inventory sheet the columns are: A Code, B Item, C Category, D Unit, E Opening stock, F Stock IN, G Stock OUT, H Current stock, I Min stock, J Unit cost, K Stock value, L Status. For the item in row 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Stock IN:  =IF($A2="","",SUMIFS(Movements!$D:$D,Movements!$B:$B,$A2,Movements!$C:$C,"IN"))
Stock OUT: =IF($A2="","",SUMIFS(Movements!$D:$D,Movements!$B:$B,$A2,Movements!$C:$C,"OUT"))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;IF($A2="","",...)&lt;/code&gt; part keeps empty rows clean.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Current stock and value
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Current stock: =IF($A2="","",E2+F2-G2)
Stock value:   =IF($A2="","",H2*J2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. The reorder alert
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Status: =IF($A2="","",IF(H2&amp;lt;=I2,"Reorder",IF(H2&amp;lt;=I2*1.5,"Low","OK")))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"Reorder" means you are at or below your minimum. "Low" gives you a warning band (up to 1.5× the minimum) so you can order before it's urgent. Add conditional formatting: red for Reorder, amber for Low.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Avoid typos with dropdowns
&lt;/h2&gt;

&lt;p&gt;Use data validation for Category, for Code in the Movements sheet (pointing to the Inventory codes) and for Type (IN/OUT). Most stock errors come from a code typed slightly differently.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. A small dashboard
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Items tracked:     =COUNTA(Inventory!A2:A201)
Total stock value: =SUM(Inventory!K2:K201)
Items to reorder:  =COUNTIF(Inventory!L2:L201,"Reorder")
Items low:         =COUNTIF(Inventory!L2:L201,"Low")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Optional: a daily low-stock email (Google Sheets)
&lt;/h2&gt;

&lt;p&gt;With Apps Script (Extensions → Apps Script), you can read the Status column, collect the Reorder and Low items and send them with &lt;code&gt;MailApp.sendEmail&lt;/code&gt;. Then a time-driven trigger runs it every morning. The key part:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Reorder&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Low&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;MailApp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendEmail&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getEffectiveUser&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;getEmail&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Low stock alert: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt; item(s)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;htmlBody&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;ScriptApp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;newTrigger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sendLowStockReport&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;timeBased&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;everyDays&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;atHour&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Free template
&lt;/h2&gt;

&lt;p&gt;If you'd rather not build it from scratch, the complete file (Excel + Google Sheets, with dashboard, dropdowns and the email script) is free, pay what you want: &lt;a href="https://gileson2.gumroad.com/l/inventory-tracker?utm_source=devto" rel="noopener noreferrer"&gt;https://gileson2.gumroad.com/l/inventory-tracker?utm_source=devto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code is also on GitHub: &lt;a href="https://github.com/JuanGiles260/inventory-tracker-sheets" rel="noopener noreferrer"&gt;https://github.com/JuanGiles260/inventory-tracker-sheets&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm Juan, an industrial engineering student from Bolivia. I build spreadsheet templates for small businesses at Lean Grid Co. Questions about the formulas? Ask in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>googlesheets</category>
      <category>excel</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
