<?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>planning &#8211; tutolibro.org</title>
	<atom:link href="https://tutolibro.org/tag/planning/feed/" rel="self" type="application/rss+xml" />
	<link>https://tutolibro.org</link>
	<description>Free online tutorials</description>
	<lastBuildDate>Tue, 21 Jan 2025 11:12:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://tutolibro.org/wp-content/uploads/2020/02/cropped-logo_mini-32x32.png</url>
	<title>planning &#8211; tutolibro.org</title>
	<link>https://tutolibro.org</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">173775150</site>	<item>
		<title>LibreOffice Tutorial: Make a Time Schedule &#8211; Part 2 &#8211; the &#8216;IF&#8217; formula</title>
		<link>https://tutolibro.org/2018/09/19/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro-part-ii/</link>
					<comments>https://tutolibro.org/2018/09/19/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro-part-ii/#respond</comments>
		
		<dc:creator><![CDATA[gweno]]></dc:creator>
		<pubDate>Wed, 19 Sep 2018 22:54:27 +0000</pubDate>
				<category><![CDATA[Calc]]></category>
		<category><![CDATA[LibreOffice]]></category>
		<category><![CDATA[calc]]></category>
		<category><![CDATA[libreoffice]]></category>
		<category><![CDATA[planning]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[time]]></category>
		<guid isPermaLink="false">http://superbusydaddy.com/?p=377</guid>

					<description><![CDATA[I moved my website to another web-host and during the process I did not realised that I transferred my word-press multi-site content to a word-press single site content. Along with a long summer looking after the children and back to...<br /><a class="read-more-button" href="https://tutolibro.org/2018/09/19/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro-part-ii/">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p>I moved my website to another web-host and during the process I did not realised that I transferred my word-press multi-site content to a word-press single site content. Along with a long summer looking after the children and back to school rush, I am only able now to write the next part of this tutorial&#8230; So sorry if you were waiting for it.</p>



<p><strong>NOTE: </strong>I have upgraded to LibreOffice 6.0, however it should works exactly the same with LO 5.</p>



<p>Before I went to bed last time we were building the logic to let LibreOffice know what Activity should be displayed now.<br></p>



<span id="more-377"></span>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<div class="wp-block-group has-background is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex" style="background-color:#7bdbb56e">
<p class="has-small-font-size">Other parts:<br>In <a href="https://tutolibro.org/2018/05/02/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro/" data-type="post" data-id="351">Part 1</a> we look at renaming a sheet, entering  some random data, formatting cells and starting to build the logic of the agenda.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/09/19/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro-part-ii/" data-type="post" data-id="377">Part 2</a> of this tutorial we write some time functions and <strong>IF</strong> formulas.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/09/26/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro-part-iii/" data-type="post" data-id="388">Part 3</a> of this tutorial we learn about nested <strong>IF</strong> and <strong>AND</strong> function.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/10/03/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro-part-iv/" data-type="post" data-id="395">Part 4</a> of this tutorial we learn about <strong>VLOOKUP</strong>.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/10/11/libreoffice-tutorial-part-v-named-range/" data-type="post" data-id="401">Part 5</a> we look at how to create and use a ‘<strong>named range</strong>’.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/11/01/libreoffice-tutorial-part-6-index/" data-type="post" data-id="420">Part 6</a>, we learn the <strong>INDEX</strong> function.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/11/15/libreoffice-tutorial-part-7-our-first-very-simple-macro/" data-type="post" data-id="446">Part 7</a>, we learn how to code a (very) simple <strong>LibreOffice Macro</strong>.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/11/29/libreoffice-tutorial-part-8-mround/" data-type="post" data-id="470">Part 8</a>, we use the <strong>MROUND</strong> function to round the time.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/12/05/libreoffice-tutorial-part-9-iserror/" data-type="post" data-id="474">Part 9</a> part we do some debugging and learned about the <strong>ISERROR</strong> and <strong>NOT</strong> functions.</p>



<p class="has-small-font-size">In <a href="https://tutolibro.org/2018/12/20/libreoffice-tutorial-part-10-wrap-up/" data-type="post" data-id="489">Part 10</a> part we add some color and formatting to wrap-up this series.</p>
</div>
</div></div>
</div>
</div>



<p>To be able to build this logic we need:</p>



<ol class="wp-block-list">
<li>To put somewhere the answer to the question: Is <strong>This Activity</strong> the <strong>Current Activity</strong>?<br>So insert a column in front of Column A and don&#8217;t put anything at the top yet.<br><em>(Right click on Column A header and select &#8220;Insert Columns Left&#8221;)</em></li>



<li><strong>This Activity</strong>: it is the activity the formula is going to look at, so basically it is the content of any cell in Column D, that was actually Column C before.</li>



<li>Formula to get the current Date &amp; Time.<br>To actually get the current date and time, that is what we are going to put at the top of column A.<br>The function to get the current date is&nbsp; &#8216;NOW()&#8217;, so in Cell A1 write:<br><strong>=NOW()<br></strong>We will change that formula later when we want to only display the current time.<br>Once you&nbsp; have entered this the cell displays date and time.</li>



<li>Formula to compare time.<br>To write the formula in A2 that checks the current time and date holds by cell A1 is between Start date in B2 and End date in C2.<br>To understand how it works I am going to do that part step by step:
<ol class="wp-block-list">
<li>The IF formula and its parameters.<br>In cell A2, we compare if current time &amp; date in A1 is greater than start date in B2:<br><strong>=IF(A1&gt;B2,1,0)<br></strong>This is a IF formula. It allows us to test if a condition is true or false. The syntax is simple:<br>IF(condition,&nbsp; result if the condition is true, result if the condition is false). So if A1&gt;B2 it returns 1, else it returns 0.<br>Hold on a minute&#8230; This formula will displays a 1 whatever the time is.<br>Indeed if I type in B2 a bigger time than the time in A1 I still get a &#8216;1&#8217;. (For example if current time is 15:10:42 and if I put 16:00:00 in B2, I still get the formula telling me that the Value in A1 is bigger than B2.<br>This is because we are comparing a &#8216;date and time&#8217; value in A1 with a &#8216;time&#8217; value in B2. So we actually need to extract only the time from the date and time in A1.</li>



<li>Formula to get only the current time and not the current date.<br>To extract the time only from A1, the easiest way is to do it straight away in A1 by using 3 functions combined with NOW():<br>TIME(), HOUR() and MINUTE(). I will add a 4th function later that will display time to the nearer 5 minutes (e.g. 11:00, 11:05, 11:10&#8230;).<br>So in A1, instead of &#8216;=NOW()&#8217; you should write:<br><strong>=TIME(HOUR(NOW()),MINUTE(NOW),0)</strong><br>How this works:&nbsp; TIME reconstruct a time value HH:MM:SS from 3 integers parameters (hour, minute, second)<br>HOUR(NOW): extract only the hours from the Date and Time given by &#8216;NOW()&#8217;.<br>MINUTE(NOW): similarly extract only the minutes from &#8216;NOW()&#8217;.<br>0: I decided to put zero for the seconds as I don&#8217;t need to have an activity plan so strict that at if I am one second late I feel bad!</li>



<li>Cell Format.<br>Another thing to change is the display format of cell A1. If you still have the default cell format you will see on your screen in A1 something like:<br>
<table style="height: 20px;" border="0" width="285" cellspacing="0"><colgroup width="105"></colgroup>
<tbody>
<tr>
<td align="right" height="17">30/12/99 23:30</td>
</tr>
</tbody>
</table>
</li>
</ol>
</li>
</ol>


<div class="wp-block-image wp-image-386 size-full">
<figure class="aligncenter"><img decoding="async" src="https://tutolibro.org/wp-content/uploads/2018/09/planner_3-1.png" alt="" class="wp-image-386"/><figcaption class="wp-element-caption">TIME function</figcaption></figure></div>


<p>With a weird date. This is because LibreOffice is still trying to display a date and time from a time value. So to have only the time displayed you should change the cell&nbsp; format the same way&nbsp; we did it for our columns &#8216;Starts&#8217; and &#8216;Ends&#8217; ([HH]:MM:SS see in the <a href="https://tutolibro.org/blog/2018/05/02/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro/" target="_blank" rel="noopener noreferrer">previous tutorial</a>).<br>So now you should have something like this:</p>



<li>$ to lock a cell.<br>Before sliding down the formula in A2, there is one thing that we need to change:<br>If we do slide down the formula that is in A2:&#8221;=IF(A1&gt;B2,1,0)&#8221;, we get in Cell A3: &#8220;=IF(A2&gt;B3,1,0)&#8221;. Which means for each cell in column A we are comparing the value of the cell just above with the cell in column B.<br>So we need to &#8216;lock&#8217; A1 when we slide the down the formula.<br>We can do so by adding a &#8216;$&#8217; in front of the column letter and another &#8216;$&#8217; in front of the column number. So in <strong>A2</strong>, instead of &#8216;=IF(A1&gt;B2,1,0)&#8217; we should type:<br><strong>=IF($A$1&gt;B2,1,0)</strong></li>



<p>Writing tutorials takes time! My activity plan once again shows&nbsp; &#8216;Zzzzz&#8217;, it&#8217;s late so let&#8217;s stop here. Next part of this tutorial series is about <a href="https://tutolibro.org/2018/09/26/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro-part-iii/">nested ‘IF’ and ‘AND’ function</a>.</p>



<p>If you like this tutorial, you could <a href="https://buymeacoffee.com/tutolibro" data-type="link" data-id="https://buymeacoffee/tutolibro" target="_blank" rel="noreferrer noopener">buy me a coffee</a> to help me continue writing add-free tutorials.</p>



<p>Thank you!</p>



<div class="wp-block-group is-content-justification-space-between is-nowrap is-layout-flex wp-container-core-group-is-layout-0dfbf163 wp-block-group-is-layout-flex">

</div>
]]></content:encoded>
					
					<wfw:commentRss>https://tutolibro.org/2018/09/19/tutorial-make-a-time-schedule-in-libreoffice-using-formulas-and-a-simple-macro-part-ii/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">377</post-id>	</item>
	</channel>
</rss>
