<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2919329461343754657</id><updated>2011-11-01T08:33:09.467-07:00</updated><category term='VBA'/><category term='kolorowanie rzędów'/><category term='English'/><category term='angielski'/><category term='przykład'/><category term='tutorial'/><category term='row colouring'/><category term='example'/><category term='Excel'/><title type='text'>Insert/Update</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://insertupdate.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://insertupdate.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Harmann</name><uri>http://www.blogger.com/profile/07534882491245014825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2919329461343754657.post-7644593154987778093</id><published>2010-04-26T12:03:00.000-07:00</published><updated>2010-04-26T12:03:29.002-07:00</updated><title type='text'>Somewhere between heaven and hells</title><content type='html'>No more declarations. No more "to be continued...". It obviously does not work for me. Instead let me tell you about a tool which I've found recently which gets you closer to heaven. Or maybe further from hell - IE hell. &lt;br /&gt;&lt;br /&gt;Programmers and web developers are well familiar with many different kinds of hell - DLL hell, JAR hell, etc. What I mean by IE hell is the situation when in order to test my newly created web page for compatibility with different versions of IE browser I have to run around in circles, begging my collegues to let me use their computers for a while. How come? It's simple. Most of us updated IE to version 8 and only several people were clever enough to resist the temptation. Now, all of us "I've got the newest IE8" wise guys depend on those who have "It doesn't work" IE7 or "Wow, I will have to rewrite this CSS especially for you" IE6 browsers. &lt;br /&gt;&lt;br /&gt;This makes me a saaaaad panda (Southpark fans know what I mean). &lt;br /&gt;&lt;br /&gt;Being determined to make something about it, recently I've started to look for a way to make all versions of IE work on a single computer. Moreover, this computer had to be my laptop not a server hosting a number of virtual machines - one for each IE version. And yesterday I found it.&lt;br /&gt;&lt;br /&gt;Remedy to all my current IE problems is called &lt;a alt="IETester" href="http://www.my-debugbar.com/wiki/IETester/HomePage"&gt;IETester&lt;/a&gt;. I've tested it myself and it has already turned out to be helpful for some of my collegues. It simply does it's job! All IE versions in one box and working! Brilliant! It may sound like a commercial or sponsored article, but who cares! I'm truely enthousiastic about my finding! IETester rocks!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_NYNxC4CPgKU/S9XjZ4lTjDI/AAAAAAAAAAM/EYo2C_tpdDE/s1600/ietester-0.3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="231" src="http://2.bp.blogspot.com/_NYNxC4CPgKU/S9XjZ4lTjDI/AAAAAAAAAAM/EYo2C_tpdDE/s400/ietester-0.3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2919329461343754657-7644593154987778093?l=insertupdate.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://insertupdate.blogspot.com/feeds/7644593154987778093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://insertupdate.blogspot.com/2010/04/somewhere-between-heaven-and-hells.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default/7644593154987778093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default/7644593154987778093'/><link rel='alternate' type='text/html' href='http://insertupdate.blogspot.com/2010/04/somewhere-between-heaven-and-hells.html' title='Somewhere between heaven and hells'/><author><name>Harmann</name><uri>http://www.blogger.com/profile/07534882491245014825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NYNxC4CPgKU/S9XjZ4lTjDI/AAAAAAAAAAM/EYo2C_tpdDE/s72-c/ietester-0.3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2919329461343754657.post-7054355151890378722</id><published>2010-02-26T12:56:00.000-08:00</published><updated>2010-02-26T13:14:04.142-08:00</updated><title type='text'>Laziness is a true curse!</title><content type='html'>It's been a month since I wrote my last post... and I'm not proud of this. Let's leave it and realize at least some of the promises I made weeks ago.&lt;br /&gt;&lt;br /&gt;Subroutine Update_Row_Colors() works in the following way:&lt;br /&gt;&lt;br /&gt;for each row between 1 and 9999 it checks wheather text in column C matches word "red" or not. In the first case, cells in columns A to F of the current row are coloured red. In the second case, the cells get no colouring.&lt;br /&gt;&lt;br /&gt;This idea is translated to VBA as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The variables of appropriate types are declared. Declaration of variable type may be ommited, however for some reasons it is a good practice to provide it.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;code&gt;Dim LRow As Integer&lt;br /&gt;Dim LCell As String&lt;br /&gt;Dim LColorCells As String&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;LRow&lt;/code&gt; variable keeps number of the current row. &lt;code&gt;LCell&lt;/code&gt; keeps name of the  cell which may contain word "red". &lt;code&gt;LColorCells&lt;/code&gt; keeps string describing  range of cells that must be coloured if the match was found.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Each row is processed separately in while loop which is executed as long  as value of LRow variable (incremented by one in each step of the loop)  is less than 10000.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;'Start at row 1&lt;br /&gt;LRow = 1&lt;br /&gt;'Update row colors for the first 10000 rows&lt;br /&gt;While LRow &amp;lt; 10000&lt;br /&gt;...&lt;br /&gt;LRow = LRow + 1&lt;br /&gt;Wend&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;For each row values of variables &lt;code&gt;LCell&lt;/code&gt; and &lt;code&gt;LColorCells&lt;/code&gt; are appropriately  set. '&amp;amp;' is the VBA concatenation operator, glueing values together  to make a single string.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;LCell = "C" &amp;amp; LRow &lt;br /&gt;'Color will changed in columns A to F &lt;br /&gt;LColorCells = "A" &amp;amp; LRow &amp;amp; ":" &amp;amp; "F" &amp;amp; LRow &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Then text in cell in column C is checked and if its red appropriate  actions are taken. ColorIndex property of the cell range interior is set to 3 (index of red  colour in the Excel colour palette) and background pattern is set to  solid if the mach is found. Otherwise cell range gets no styling.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Select Case Range(LCell).Value&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Set row color to light yellow &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "red" &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Range(LColorCells).Interior.ColorIndex = 3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Range(LColorCells).Interior.Pattern = xlSolid&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Default all other rows to no color&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Else &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rows(LRow &amp;amp; ":" &amp;amp; LRow).Select&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Range(LColorCells).Interior.ColorIndex = xlNone &lt;br /&gt;End Select&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;In my next post I would like to show how to use Excel colour palette to pick the colour we want to use and how to interactively provide text we want to look for in cells.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2919329461343754657-7054355151890378722?l=insertupdate.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://insertupdate.blogspot.com/feeds/7054355151890378722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://insertupdate.blogspot.com/2010/02/laziness-is-true-curse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default/7054355151890378722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default/7054355151890378722'/><link rel='alternate' type='text/html' href='http://insertupdate.blogspot.com/2010/02/laziness-is-true-curse.html' title='Laziness is a true curse!'/><author><name>Harmann</name><uri>http://www.blogger.com/profile/07534882491245014825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2919329461343754657.post-9116756126570852240</id><published>2010-01-29T13:12:00.000-08:00</published><updated>2010-01-31T08:11:33.475-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kolorowanie rzędów'/><category scheme='http://www.blogger.com/atom/ns#' term='example'/><category scheme='http://www.blogger.com/atom/ns#' term='VBA'/><category scheme='http://www.blogger.com/atom/ns#' term='Excel'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='row colouring'/><category scheme='http://www.blogger.com/atom/ns#' term='przykład'/><category scheme='http://www.blogger.com/atom/ns#' term='angielski'/><category scheme='http://www.blogger.com/atom/ns#' term='English'/><title type='text'>Laziness is a true virtue!</title><content type='html'>Being lazy is a virtue. Especially if what you have on your mind is not the coach potato kind of laziness but something more like "I will spend this hour working to save fifteen minutes of some dull everyday work" laziness. Generally, this blog will be about me being lazy and happy so better get used to it.&lt;br /&gt;&lt;br /&gt;Example. Your boss gives you an Excel spreadsheet, 10 thousand rows of data, and tells you that all those rows which have text 'red' in column C should have green background. You can check each row and spend whole day updating the document. You can reduce time spent on this fascinating task to two hours being clever and using the 'Search' option.&lt;br /&gt;&lt;br /&gt;But you can do it in a single mouseclick! However, first you have to write a macro, a small piece of code that will do the work for you. Macros for Excel are written in Visual Basic for Applications (VBA) language. And here is the solution to our problem, row-colouring function. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt; Sub Update_Row_Colors()&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim LRow As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim LCell As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim LColorCells As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Start at row 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LRow = 1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Update row colors for the first 10000 rows&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; While LRow &amp;lt; 10000&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    LCell = "C" &amp;amp; LRow&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Color will changed in columns A to F&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    LColorCells = "A" &amp;amp; LRow &amp;amp; ":" &amp;amp; "F" &amp;amp; &lt;/code&gt;&lt;code&gt;LRow &lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case Range(LCell).Value&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Set row color to light yellow&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "red"&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Range(LColorCells).Interior.ColorIndex = 3&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Range(LColorCells).Interior.Pattern = xlSolid&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Default all other rows to no color&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Else&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rows(LRow &amp;amp; ":" &amp;amp; LRow).Select&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Range(LColorCells).Interior.ColorIndex = xlNone&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LRow = LRow + 1&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wend          Range("A1").Select&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;     End Sub&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I had a very similar problem to solve recently. For a couple of days I was doing such colourings manually. Finally I was fed up with this enough to find different solution at &lt;a href="http://www.techonthenet.com/excel/macros/change_color.php"&gt;this&lt;/a&gt; page. The above code is based on the one I found at Tech on the Net.&lt;br /&gt;&lt;br /&gt;In the future I would like to extend this example to make it more flexible. If you want to know what interesting can be done about it, follow me on this blog. Believe me - I am about to prepare even more lazy version of it.&lt;br /&gt;&lt;br /&gt;Next time I will start from going line by line through the code to describe in detail what is really happening there and then I will move on to showing some lazy extensions. Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2919329461343754657-9116756126570852240?l=insertupdate.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://insertupdate.blogspot.com/feeds/9116756126570852240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://insertupdate.blogspot.com/2010/01/laziness-is-true-virtue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default/9116756126570852240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default/9116756126570852240'/><link rel='alternate' type='text/html' href='http://insertupdate.blogspot.com/2010/01/laziness-is-true-virtue.html' title='Laziness is a true virtue!'/><author><name>Harmann</name><uri>http://www.blogger.com/profile/07534882491245014825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2919329461343754657.post-144122020857840128</id><published>2010-01-27T13:05:00.000-08:00</published><updated>2010-01-27T13:05:13.689-08:00</updated><title type='text'>The First Post</title><content type='html'>Hello Blogger! Hello World!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2919329461343754657-144122020857840128?l=insertupdate.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://insertupdate.blogspot.com/feeds/144122020857840128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://insertupdate.blogspot.com/2010/01/first-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default/144122020857840128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2919329461343754657/posts/default/144122020857840128'/><link rel='alternate' type='text/html' href='http://insertupdate.blogspot.com/2010/01/first-post.html' title='The First Post'/><author><name>Harmann</name><uri>http://www.blogger.com/profile/07534882491245014825</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
