<?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-8868561185920296321</id><updated>2011-11-27T15:24:01.580-08:00</updated><title type='text'>VBA for Dummies (and some Excel Tips!)</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vbafordummies.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868561185920296321/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://vbafordummies.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Simon</name><uri>http://www.blogger.com/profile/06800569994023594386</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>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8868561185920296321.post-6132628628767720650</id><published>2007-10-27T01:18:00.000-07:00</published><updated>2007-10-27T01:38:48.758-07:00</updated><title type='text'>Tip 1: How to auto fill a column in excel with VBA</title><content type='html'>Hi&lt;br /&gt;&lt;br /&gt;So here is my first tip, and it is one I use regularly in the office as I produce all sorts of reports that need cells auto fill but I never know the number of cells to filldown as the data fluctuates daily.&lt;br /&gt;&lt;br /&gt;In Excel, if you use the macro recorder to record a fill down you will notice that when looking at the macro afterwords it will have 'hard coded' the cell references of your example. See below...&lt;br /&gt;&lt;br /&gt;    Range("B1").Select&lt;br /&gt;    ActiveCell.FormulaR1C1 = "Test"&lt;br /&gt;    Range("B1").Select&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;Selection.AutoFill Destination:=Range("B1:B48")&lt;/span&gt;&lt;br /&gt;    Range("B1").Select&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As you can see the cell references on the autofill are hard coded and would therefor be of no use if you had say 200 rows of data because the autofill would only occur between rows 1 - 48.&lt;br /&gt;&lt;br /&gt;In order to make the cell references variable we use a technique which starts at the bottom of the worksheet and finds the last row in it and uses this as your lower boundary. &lt;br /&gt;&lt;br /&gt;Range("B1").Select&lt;br /&gt;    ActiveCell.FormulaR1C1 = "Test"&lt;br /&gt;    Range("B1").Select&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;Selection.AutoFill Destination:=Range("B1:B" &amp; Range("A65536").End(xlUp)&lt;/span&gt;&lt;br /&gt;    Range("B1").Select&lt;br /&gt;&lt;br /&gt;What this code is now doing is saying ok, I want to auto fill the string "test" from cell B1 to... and then starting at the bottom of column A its looking up the worksheet to find the last cell with values in it and using this cell as the second reference.&lt;br /&gt;&lt;br /&gt;As an example if you had a sheet with values in cells A1 through to A200 the code would autofill from B1:B200.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868561185920296321-6132628628767720650?l=vbafordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbafordummies.blogspot.com/feeds/6132628628767720650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868561185920296321&amp;postID=6132628628767720650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868561185920296321/posts/default/6132628628767720650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868561185920296321/posts/default/6132628628767720650'/><link rel='alternate' type='text/html' href='http://vbafordummies.blogspot.com/2007/10/tip-1-how-to-auto-fill-column-in-excel.html' title='Tip 1: How to auto fill a column in excel with VBA'/><author><name>Simon</name><uri>http://www.blogger.com/profile/06800569994023594386</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-8868561185920296321.post-2355315816520107802</id><published>2007-10-26T08:38:00.000-07:00</published><updated>2007-10-26T08:40:53.365-07:00</updated><title type='text'>Welcome to vba for dummies!</title><content type='html'>Hi&lt;br /&gt;&lt;br /&gt;This blog has been created to offer a wealth of vba informaton including example scripts, code, and formulas for use at home or work. The content will be pitched at all levels and very easy to adopt. I will be updating with a weekly tip and posting any useful information I come across. I look forward to writing the blog and to you all reading it.&lt;br /&gt;&lt;br /&gt;SM&lt;br /&gt;VbaForDummies&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8868561185920296321-2355315816520107802?l=vbafordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbafordummies.blogspot.com/feeds/2355315816520107802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8868561185920296321&amp;postID=2355315816520107802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8868561185920296321/posts/default/2355315816520107802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8868561185920296321/posts/default/2355315816520107802'/><link rel='alternate' type='text/html' href='http://vbafordummies.blogspot.com/2007/10/welcome-to-vba-for-dummies.html' title='Welcome to vba for dummies!'/><author><name>Simon</name><uri>http://www.blogger.com/profile/06800569994023594386</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>
