<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Excel | Digital Nomad Blog</title>
	<atom:link href="https://online-dentist.hu/en/tag/excel/feed/" rel="self" type="application/rss+xml" />
	<link>https://online-dentist.hu</link>
	<description></description>
	<lastBuildDate>Sat, 17 Jan 2026 10:47:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://online-dentist.hu/wp-content/uploads/2025/11/cropped-logo_circle_transparent-32x32.png</url>
	<title>Excel | Digital Nomad Blog</title>
	<link>https://online-dentist.hu</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[4] How I Built an Excel System to Manage Animal Health Tasks</title>
		<link>https://online-dentist.hu/en/how-i-built-an-excel-system-to-manage-animal-health-tasks/</link>
					<comments>https://online-dentist.hu/en/how-i-built-an-excel-system-to-manage-animal-health-tasks/#respond</comments>
		
		<dc:creator><![CDATA[Steve – Digital Nomad]]></dc:creator>
		<pubDate>Tue, 28 Oct 2025 18:39:39 +0000</pubDate>
				<category><![CDATA[How I Built IT]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<guid isPermaLink="false">https://online-dentist.hu/?p=4040</guid>

					<description><![CDATA[<p>I built an Excel-based ERP system to manage animal health programs - automating forecasts, daily logs, and data flow across multiple farms with VBA logic.</p>
<p>The post <a href="https://online-dentist.hu/en/how-i-built-an-excel-system-to-manage-animal-health-tasks/">[4] How I Built an Excel System to Manage Animal Health Tasks</a> first appeared on <a href="https://online-dentist.hu">Digital Nomad Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>When you spend enough time around both farms and spreadsheets, you start seeing them the same way &#8211; full of moving parts, complex dependencies, and a fragile balance between structure and chaos.</p>
<p>This project started as a simple task tracker for animal health programs. It evolved into a full-blown Excel-based ERP-like system, complete with automated forecasting, daily logging, and VBA-driven workflows for multiple farm sites.</p>
<h3>The result &#8211; summary interpretation</h3>
<p>This file is practically a customized ERP mini-system in Excel that:</p>
<ul>
<li>programs and tracks production at the farm level,</li>
<li>automates data collection and logging,</li>
<li>predicts yield and performance,</li>
<li>and connects all data sets (farm, program, hybrid, log).</li>
</ul>
<p>In other words:</p>
<blockquote><p>A macro-supported livestock management system built into Excel, covering everything from planning to daily reporting.</p></blockquote>
<h2>Step 1: Defining the Problem</h2>
<p>Each farm was managing different hybrids &#8211; broilers, layers, growers &#8211; all with their own weekly schedules and health control programs. The biggest challenge was centralizing the data while keeping it flexible enough for local use.</p>
<p>I needed one workbook that could:</p>
<ul>
<li>Handle multiple farms (telephelyek)</li>
<li>Store and forecast production programs</li>
<li>Log daily operational data</li>
<li>Predict outcomes weeks ahead</li>
</ul>
<p>So I built _program.xlsm &#8211; a macro-enabled Excel system that ties together every stage of the production and monitoring process.</p>
<h2>Step 2: Structuring the Workbook</h2>
<p>Every sheet had a clear role in the workflow:</p>
<div class="aux-row aux-col2 aux-tb-col1 aux-mb-col1">
<div class="aux-col"><strong>Sheet</strong> </div>
<div class="aux-col"><strong>Function</strong></div>
<div class="aux-col">Menu The main dashboard</div>
<div class="aux-col">a control center for launching macros and opening program sheets.</div>
<div class="aux-col">Helper</div>
<div class="aux-col">Helper sheet – stores reference data, constants, and validation lists.</div>
<div class="aux-col">Programs</div>
<div class="aux-col">The registry of all active production programs.</div>
<div class="aux-col">Locations</div>
<div class="aux-col">Master list of farms and locations.</div>
<div class="aux-col">Actual program pages</div>
<div class="aux-col">Active program sheets for each farm type.</div>
<div class="aux-col">Prediction </div>
<div class="aux-col">The dynamic forecast, refreshed automatically by VBA.</div>
<div class="aux-col">Diary </div>
<div class="aux-col">The daily data entry sheets where everything comes together.</div>
</div>
<p>What started as a set of templates became a living system that could plan, record, and predict.</p>
<h2>Step 3: Automating the Forecast</h2>
<p>The core of the logic lives inside one macro:</p>
<p>Since I designed the applicable health programs and the templates for each site with a fixed number of rows, sequential processing was given a serious shortcut. Thus, the data for the 30 sites is processed in seconds. The weekly forecast sorts the tasks to be completed and the tasks that have not been completed according to the number of weeks set on the Helper worksheet, starting from the current week.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="visualbasic">‘ Visual Basic

Sub elorejelzes()

    Application.ScreenUpdating = False
    Application.Calculation = xlManual
        
    ' Törlöm az előrejelzés munkalap fejlécen kívüli részét
    sh_elorejelzes.Rows("2:5000").Delete
    hova_irok = 2

    ' Hány hetet nézünk előre
    hetek = sh_seged.Range("Q3").Value
    
    ' a: munkalap ciklus
    For A = 1 To 2
    
        If A = 1 Then
            Set ws = sh_prog_novendek_telep
            meddig = 1363
            tipus = "növendék"
        Else
            Set ws = sh_prog_tojo_telep
            meddig = 683
            tipus = "tojó"
        End If
        
        hanyadik_het_van = ws.Range("A2").Value
        akt_ev = Year(Date)
        
        ' b: a munkalapon meddig vannak sorok
        For b = 4 To meddig
        
            oF = ws.Range("F" &amp; CStr(b)).Value
            
            ' Fejléc meghatározása:
            If (oF = "Telephely:") _
            Then
            
                szerepel_a_tervezesben = ws.Range("Q" &amp; CStr(b + 2)).Value
                
                If szerepel_a_tervezesben = False _
                Then
                    ' Ha nem szerepel a napló a tervezésben, skippelem
                    b = b + 67
                Else
                    telephely = ws.Range("H" &amp; CStr(b)).Value
                    
                    If telephely = "" _
                    Then
                        ' Ha nincs megadva a telephely, skippelem a naplót
                        b = b + 67
                    Else
                    
                        ' Van telephely, szerepel a tervben =&gt; beolvasom a fejléc többi sorát
                        prog_mintavetel = ws.Range("H" &amp; CStr(b + 1)).Value
                        prog_vakcina = ws.Range("H" &amp; CStr(b + 2)).Value
                        istalo_tol = ws.Range("K" &amp; CStr(b)).Value
                        istalo_ig = ws.Range("L" &amp; CStr(b)).Value
                        telepites = ws.Range("K" &amp; CStr(b + 1)).Value
                        allomany_1 = ws.Range("K" &amp; CStr(b + 2)).Value
                        allomany_2 = ws.Range("L" &amp; CStr(b + 2)).Value
                        allomany_3 = ws.Range("M" &amp; CStr(b + 2)).Value
                        het = ws.Range("M" &amp; CStr(b + 1)).Value
                        kor = ws.Range("Q" &amp; CStr(b + 1)).Value
                        
                        'MsgBox telephely
                        
                        ' A napló felső fele a mintavétel
                        program = "mintavétel"
                        
                        For c = b + 6 To b + 66
                        
                            ' Innentől vakcina sorok
                            If c = b + 36 Then program = "vakcina"
                            
                            akt_het = ws.Range("C" &amp; CStr(c)).Value
                            prg_het = ws.Range("M" &amp; CStr(c)).Value
                            teny_datum = ws.Range("Q" &amp; CStr(c)).Value
                            allapot = ws.Range("P" &amp; CStr(c)).Value
                            megjegyzes = ws.Range("R" &amp; CStr(c)).Value
                            
                            
                            ' Ezzel a feléc sorokat skippelem
                            If IsNumeric(akt_het) _
                            Then
                                
                                sor_ev = Year(ws.Range("B" &amp; CStr(c)).Value)
                                
                                kell_a_sor = False
                            
                                ' Ezek már tisztán az adat sorok. A paraméterek alapján döntjük el, hogy szerepel -e az előrejelzésben.
                                If prg_het &gt;= akt_het And prg_het &lt;= akt_het + hetek Then kell_a_sor = True 
                                If teny_datum &lt;&gt; "" Then kell_a_sor = False
                                If prg_het &lt;&gt; 0 And prg_het &lt; hanyadik_het_van And teny_datum = "" And sor_ev &lt;= akt_ev Then kell_a_sor = True
                                
                                If kell_a_sor _
                                Then
                                
                                    ' A fejléc adatok minden sorba bekerülnek:
                                        sh_elorejelzes.Range("A" &amp; CStr(hova_irok)).Value = telephely
                                        sh_elorejelzes.Range("B" &amp; CStr(hova_irok)).Value = istalo_tol
                                        sh_elorejelzes.Range("C" &amp; CStr(hova_irok)).Value = istalo_ig
                                        sh_elorejelzes.Range("D" &amp; CStr(hova_irok)).Value = telepites
                                        sh_elorejelzes.Range("E" &amp; CStr(hova_irok)).Value = "'" &amp; het
                                        sh_elorejelzes.Range("F" &amp; CStr(hova_irok)).Value = allomany_1
                                        sh_elorejelzes.Range("G" &amp; CStr(hova_irok)).Value = allomany_2
                                        sh_elorejelzes.Range("H" &amp; CStr(hova_irok)).Value = allomany_3
                                        sh_elorejelzes.Range("I" &amp; CStr(hova_irok)).Value = prog_mintavetel
                                        sh_elorejelzes.Range("J" &amp; CStr(hova_irok)).Value = prog_vakcina
                                        sh_elorejelzes.Range("K" &amp; CStr(hova_irok)).Value = kor
                                        sh_elorejelzes.Range("L" &amp; CStr(hova_irok)).Value = tipus
                                    
                                    'Az adat sorok másolással kerülnek át:
                                        ws.Range("F" &amp; CStr(c) &amp; ":L" &amp; CStr(c)).Copy
                                        sh_elorejelzes.Range("M" &amp; CStr(hova_irok)).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
                                        
                                        sh_elorejelzes.Range("T" &amp; CStr(hova_irok)).Value = prg_het
                                        sh_elorejelzes.Range("U" &amp; CStr(hova_irok)).Value = allapot
                                        sh_elorejelzes.Range("V" &amp; CStr(hova_irok)).Value = megjegyzes
                                    
                                    hova_irok = hova_irok + 1
                                
                                
                                End If
                                
                            End If
                        
                        Next c
                        
                        b = b + 67
                        
                    End If
                End If
                 
            End If
        
        Next b
       
    Next A

    Application.ScreenUpdating = True
    Application.Calculation = xlAutomatic

    Call elorejelzes_rendezes(hanyadik_het_van)

    MsgBox "Végeztem az előrejelzéssel."


End Sub</pre>
<p>&nbsp;</p>
<h2>Step 4: The Sorting Issue</h2>
<p>At one point, a simple task &#8211; sorting a list of records &#8211; became the biggest roadblock.</p>
<p>The macro crashed with:</p>
<p><em>“Too few arguments to function”</em></p>
<p>and later:</p>
<p><em>“Argument #1 ($value) must be of type Countable|array, string given.”</em></p>
<p><strong>The culprit?</strong></p>
<p>Merged cells. Excel’s sorting engine simply refuses to work on merged ranges.</p>
<p>After some minutes of debugging, I rewrote the routine:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="visualbasic">‘ Visual Basic

.SortFields.Clear
.SortFields.Add2 _
    Key:=rendezni.Range("L37:L66"), _
    SortOn:=xlSortOnValues, _
    Order:=xlAscending, _
    DataOption:=xlSortNormal
.SetRange rendezni.Range("A37:N66")
.Header = xlNo</pre>
<p>&nbsp;</p>
<p>Once I unmerged the range and used the modern .Add2 method, the problem disappeared.</p>
<p>That fix wasn’t just a patch &#8211; it was a reminder: Excel doesn’t forgive structural shortcuts.</p>
<h2>Step 5: Connecting It All</h2>
<p>After that, the system finally worked seamlessly:</p>
<ul>
<li>New programs can be created from templates</li>
<li>Data flows from daily logs to forecasts</li>
<li>Reports are updated automatically with one click</li>
<li>And every farm’s lifecycle is reflected in a single file</li>
</ul>
<p>It’s not just an Excel file anymore &#8211; <strong>it’s a data-driven management tool.</strong></p>
<h3>What I Learned</h3>
<ul>
<li>Merged cells are the enemy of automation.</li>
<li>VBA macros need a clear separation between data, logic, and output sheets.</li>
<li>Building an ERP-like system in Excel is absolutely possible &#8211; if you respect structure.</li>
<li>Every small bug (like that sorting issue) hides a deeper design lesson.</li>
</ul>
<h3>Final Thoughts</h3>
<p>What started as a weekend experiment became a living ecosystem for animal health management.</p>
<p>This project taught me that even inside the “limited” world of Excel, there’s room for real engineering.</p>
<p>You just need to think like a developer &#8211; and debug like one too.</p>
<span class="aux-highlight aux-highlight-blue">Sometimes the best systems aren’t built with frameworks &#8211; they’re built with patience, logic, and a few thousand cells of pure intent.</span><p>The post <a href="https://online-dentist.hu/en/how-i-built-an-excel-system-to-manage-animal-health-tasks/">[4] How I Built an Excel System to Manage Animal Health Tasks</a> first appeared on <a href="https://online-dentist.hu">Digital Nomad Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://online-dentist.hu/en/how-i-built-an-excel-system-to-manage-animal-health-tasks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 45/78 objects using Disk
Page Caching using Disk: Enhanced 

Page cache debug info:
Engine:             Disk: Enhanced
Cache key:          online-dentist.hu/en/tag/excel/feed/_index_slash_ssl.xml
Creation Time:      1790708051.000s
Header info:
Last-Modified:      Tue, 29 Sep 2026 18:08:57 GMT
ETag:               "2a80fe289e2fbf277150c08c0a0705c0"
X-Powered-By:       W3 Total Cache
X-Robots-Tag:       noindex, follow
Link:               <https://online-dentist.hu/wp-json/>; rel="https://api.w.org/"
Link:               <https://online-dentist.hu/wp-json/wp/v2/tags/527>; rel="alternate"; title="JSON"; type="application/json"
Content-Type:       application/rss+xml; charset=UTF-8

Database Caching 1/48 queries in 0.025 seconds using Disk (Request-wide modification query)

Served from: online-dentist.hu @ 2026-09-29 18:54:11 by W3 Total Cache
-->