<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>conditional-formatting on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/conditional-formatting/</link>
    <description>Recent content in conditional-formatting on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 17 Aug 2006 12:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/conditional-formatting/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>In-cell Excel charts</title>
      <link>https://www.s-anand.net/blog/in-cell-excel-charts/</link>
      <pubDate>Thu, 17 Aug 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/in-cell-excel-charts/</guid>
      <description>&lt;p&gt;Juice analytics has some &lt;a href=&#34;http://www.juiceanalytics.com/weblog/index.php?tag=excel&#34;&gt;Excel graphing&lt;/a&gt; tips. You can make charts like below without using charts, using just text.&lt;/p&gt;
&lt;p&gt;These are useful because the charts are aligned with the data.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-excel-gantt-charts-using-just-text_217629714_o-gif.webp&#34;&gt;&lt;img alt=&#34;Excel Gantt charts using just text&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-excel-gantt-charts-using-just-text_217629714_o-gif.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-excel-bar-charts-using-just-text_217629715_o-gif.webp&#34;&gt;&lt;img alt=&#34;Excel bar charts using just text&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-excel-bar-charts-using-just-text_217629715_o-gif.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I once used a similar technique to display people&amp;rsquo;s staffing position. The sheet below lists people, projects they&amp;rsquo;re on and how long they&amp;rsquo;ll be on. The coloured cells to the right are a calendar display of the same stuff. Makes it easy to read.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-excel-staffing-plan-without-using-charts_217642002_o-png.webp&#34;&gt;&lt;img alt=&#34;Excel Staffing Plan without using charts&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-excel-staffing-plan-without-using-charts_217642002_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The trick is to place each week for each person as a thin cell, like below. Then the cell is populated with a formula that makes it 0 or 1 depending on whether the person is available that week or not. (The blue row #2 stores the start date of the week, and I compare this with the end date of each person&amp;rsquo;s project.)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-excel-staffing-plan---formula_217642004_o-png.webp&#34;&gt;&lt;img alt=&#34;Excel Staffing Plan - formula&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-excel-staffing-plan---formula_217642004_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And then, you can turn on conditional formatting.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-excel-staffing-plan---conditional-formatting_217642003_o-png.webp&#34;&gt;&lt;img alt=&#34;Excel Staffing Plan - conditional formatting&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-excel-staffing-plan---conditional-formatting_217642003_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Excel - Avoid manual labour 4</title>
      <link>https://www.s-anand.net/blog/excel-avoid-manual-labour-4/</link>
      <pubDate>Wed, 21 Dec 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/excel-avoid-manual-labour-4/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Debugging in Excel&lt;/strong&gt; is another time consuming task. 80% of the trouble is identifying the problem (Error? What error? Where?) as opposed to fixing it (Why&amp;rsquo;s THAT cell showing THAT?). Most of my time is spent chasing three kinds of errors: wrong reference (leading to a #N/A or #REF!), wrong data input, or wrong formula.&lt;/p&gt;
&lt;p&gt;Wrong references are easy to spot. You&amp;rsquo;ll see a #N/A or a #REF! sticking out. But on large sheets, even that&amp;rsquo;s tough to spot. I always &lt;strong&gt;have a SUM (or some kind of total) function that covers EVERY cell in EVERY table&lt;/strong&gt;, even if I don&amp;rsquo;t need that information. If ther SUM shows a #N/A or #REF!, I can use Trace Error (Alt-T-U-E) to see where the problem is coming from.&lt;/p&gt;
&lt;p&gt;If you &lt;strong&gt;know&lt;/strong&gt; there&amp;rsquo;s a wrong reference in a cell (say A1), and want to ignore it, use a new cell with the formula =IF(ISERROR(A1),0,A1). You can substitute an entire row, column or table this way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wrong data input&lt;/strong&gt; is best avoided upfront. Before I hand my Excel sheets over for large scale data entry, I do three things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Let them enter data only in input areas&lt;/strong&gt;. Unprotect the cells the user can enter data in (Ctrl-1, Protection, remove the tick against &amp;lsquo;Locked&amp;rsquo;), and protect the whole sheet (Alt-T-P-P).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validate the data&lt;/strong&gt;. Turn on data validation (Alt-D-L) on &lt;strong&gt;all editable cells&lt;/strong&gt;, and specify the validation criteria.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make it easy to spot errors&lt;/strong&gt;. If there are percentages that should add to 100%, show the total in a cell that turns green if the total is 100%, and red otherwise. (Use conditional formatting - Alt-O-D). If data about 20 people must be entered, show the number of people about whom data is entered, and mark it red until it&amp;rsquo;s 20. Make sure &lt;strong&gt;all&lt;/strong&gt; criteria are captured. When the spreadsheet is filled, it should be impossible to make errors.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Wrong formulae (like + instead of -) are tough to spot. The best way to check for this is to &lt;strong&gt;do the same calculation &lt;strong&gt;in different ways&lt;/strong&gt;, and compare the results&lt;/strong&gt;. Whenever I create complex tables, I always have an error row at the bottom. I compare the totals on the table with the totals &lt;strong&gt;calculated in a simpler way&lt;/strong&gt; and check the difference. This warns me when I miss out some elements, or double count something, in the table.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rajlaxmi&lt;/strong&gt; &lt;em&gt;1 Jan 2006 5:08 pm&lt;/em&gt;:
great tutorial on excel..ready reckoner&amp;hellip;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;2 Jan 2006 9:42 pm&lt;/em&gt;:
Thanks!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Peter&lt;/strong&gt; &lt;em&gt;8 Mar 2007 11:31 pm&lt;/em&gt;:
Avoid Manual Labour: I just spent hours writing a VB script that does essentially what the &amp;lsquo;Conditional Formatting&amp;rsquo; feature does. Thanks for pointing it out!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://isomorphismes.tumblr.com&#34;&gt;isomorphismes&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;13 Mar 2013 5:26 pm&lt;/em&gt;:
That is a great idea.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>Excel - Avoid manual labour</title>
      <link>https://www.s-anand.net/blog/excel-avoid-manual-labour/</link>
      <pubDate>Thu, 17 Nov 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/excel-avoid-manual-labour/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Rule #3: Avoid manual labour&lt;/strong&gt;. Use Excel to automate the task.&lt;/p&gt;
&lt;p&gt;I use Excel&amp;rsquo;s formulas to speed up repetitous tasks. These techniques are &lt;strong&gt;powerful&lt;/strong&gt;, meaning, you can do a lot with a little, but can have unforeseen consequences.&lt;/p&gt;
&lt;p&gt;Excel can &lt;strong&gt;find and replace formulas&lt;/strong&gt;. If you had hardcoded formulas and wanted to change =B1*3.14 to =B1*3.1416 across all rows, just find &amp;ldquo;*3.14&amp;rdquo; and replace it with &amp;ldquo;*3.1416&amp;rdquo;. Find and replace works in formulas. &lt;strong&gt;This is very powerful&lt;/strong&gt;. You can use it to change the source (e.g. change the source from column B to C by finding &amp;ldquo;=B&amp;rdquo; and replacing with &amp;ldquo;=C&amp;rdquo;) or even the formula (find and replace &amp;ldquo;SUM(&amp;rdquo; with &amp;ldquo;SUBTOTAL(9,&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;You can also &lt;strong&gt;search and replace for errors&lt;/strong&gt; (like #N/A, #REF, etc). In the Find dialog options, select &amp;ldquo;Values&amp;rdquo; under the Look in&amp;quot; option. To replace these cells, copy and paste the cells by value (Ctrl-C, go where you want to paste, Alt-E-S-V-Enter). Now you can search and replace #N/A just like any other value.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Find external links&lt;/strong&gt;. If you have links to other Excel files, and one of them is missing, you&amp;rsquo;ll get an error saying &amp;ldquo;This workbook contains links &amp;hellip;&amp;rdquo; It&amp;rsquo;s annoying, and difficult to trace the source. But since links to external files have the formula =Path[file]Sheet!Cell, just search for &amp;ldquo;[&amp;rdquo; across sheets (you can search across sheets using the Options button).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Format based on value&lt;/strong&gt;. &lt;strong&gt;Conditional formatting (Alt-O-D) accepts formulas&lt;/strong&gt;. You can set a cell&amp;rsquo;s background to red, yellow or green if it&amp;rsquo;s value is low, medium or high. Pick a cell, say D3. In conditional formatting, select &amp;ldquo;Formula is&amp;rdquo; instead of &amp;ldquo;Cell value is&amp;rdquo;, and type &amp;ldquo;=D3&amp;lt;10&amp;rdquo;. Set the format to a red background. Copy the formatting to all the cells (use the Format Painter button, or Edit-Paste Special-Formats). All cells less than 10 will have a red background. &lt;strong&gt;This is powerful&lt;/strong&gt; because you can use any formula based on any cell. For example, you could pick the conditional formatting formula &amp;ldquo;=$C3&amp;lt;10&amp;rdquo; for the cell D3. The cell becomes red if the cell to its left is less than 10. Best of all, you can say &amp;ldquo;=$C3&amp;lt;$A$1&amp;rdquo;. As you change the value in cell A1, the colours change automatically. Since you can copy and paste the formatting alone (Edit - Paste Special - Format), you can set the conditional format in one cell, and copy &amp;amp; paste it across any selection.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remove unwanted rows&lt;/strong&gt;. Sometimes, when you import data, you have empty rows, or errors or whatever. To delete empty rows, select the data, go to Data - Filter - Autofilter. Click on one of the arrow buttons, and select the &amp;ldquo;(Blank)&amp;rdquo;. This will display all the blank rows. Select them all and delete them. If you want to delete rows with errors, click the arrow button, select whichever values are errors, and delete those rows. If you want to delete rows based on some other criteria, create a new column that shows TRUE or FALSE based on the criteria, do the Autofilter, and delete the rows.&lt;/p&gt;
&lt;p&gt;An alternative to Autofilter is to sort the data based on the column you want. All blank rows (or errors, etc) will be grouped together, and you can delete them at one shot.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ahmed&lt;/strong&gt; &lt;em&gt;17 Nov 2005 12:00 pm&lt;/em&gt;:
what`s the meaning of $ in the cell that comes before the cell location like $A$3 thanx a lot&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kannan&lt;/strong&gt; &lt;em&gt;17 Nov 2005 12:00 pm&lt;/em&gt;:
To find the links, go to Edit and Links - You can find the external links instead of search.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
  </channel>
</rss>
