Random Post: What's In A Name
RSS 2.0
  • Home
  • About
  • MBA Guide
  • Print Ad Blog
  •  

    Quick Windows Tip

    August 10th, 2009

    Every now and then a person stumbles across a small tip that makes life easy. Well, maybe just easier. Today I share one of those tips with you, the shift key.

    We all use the shift key, but few people know about the additional power that it can provide. Gone are the days where it is used just for making a letter upper case or YELLING on the internet.

    On a Windows OS,  holding the shift key while right clicking an item in a folder allows you to open the document read-only.  Very helpful if you don’t want to lock people of of the document, but still want it open.

    The second and more helpful trick that I learned is in Excel.  Have you ever wanted to have a single page summary, but just couldn’t get it to work because the column widths for the stuff above doesn’t match with the stuff you want below?  Shift can help.

    Copy the area that you want and then hold shift and go up to Edit > Paste Picture Link.  You now have a picture that is easily moved around, no matter the above column structure.  Better yet, if you change anything in the original range, it changes along with it!

    Update: As commenter Ryan, of RyanMalesevich.com fame, points out, this is for Excel 2003.  For 2007, no shift is needed.  Just click the down arrow below “Paste” > “As Picture” > “Paste Picture Link”

    Do you have any tips to share?

    This has been a Thought From The Cake Scraps.



    Excel Dynamic Data Validation Range: Indirect

    February 24th, 2009

    magic-trick-799126In the world of dashboard and report generation every little trick can help.  The trick might save you time, make something possible, or just look pretty sweet.  I think that any one of these is a great reason to employ an Excel trick, but I have to be honest; I am partial to the last one.

    The reason that I love Excel tricks that look sweet is that often times if it looks sweet then it is also more likely to be used and appreciated by others.  On top of all of that it can be fun just seeing what Excel can do.  With all of that in mind, I give you my first post on Excel Tips and Tricks: Creating a Dynamic Data Validation Range.

    The first tool that you will need is the “INDIRECT” formula.  The INDIRECT formula takes a text string and evaluates it as a range.  So, whereas normally a formula might say ‘=sheet1!A6’ and INDIRECT would look like ‘=INDIRECT(“sheet1!A6”)’.  The main difference is that the second formula is text and can be broken up into text segments and concanated together like this ‘=INDIRECT(“sheet1″&”!A”&6″)’ which is the key because then any component within the INDIRECT can be part text part cell references, calculations, formulas, etc.  Here’s and example of that ‘=INDIRECT(“sheet1″&”!A”&3*2)’ or if cell B1 had a value of 6 in it ‘=INDIRECT(“sheet1″&”!A”&B1)’.  All of these formulas would return the value that is in sheet1!A6.

    Whew! Take a deep breath after that.  Perhaps take a second to play around with it because the next part relies on it.

    The difficult part about using data validation in a cell is that the data validation range must be in the same sheet as the cell you are validating.  Unless you use a named range.  You cand define a named range in 2 ways.  The first is to select what you want and then in the box in the upper left corner of the sheet type a name.  The second is to use Insert > Name > Define (2003) or Formulas > Defined Names > Define Name >Define Name (2007)

    Here’s the setup.  I am entering “List of Letters” in Sheet2!A1 with letters A – F in column A rows 2 – 7.  Select Sheet2!A1:A7 and type “Data” into that box in the upper left corner.  You should now have a named range called “Data”.

    Then in cell Sheet1!A1 Use Data Validation and select List for the “Allow” drop box.  For the source type “=Data”.  You should now have a drop down in Sheet1!A1 that has all of the values from Sheet2!A1:A7.  Now you have applied Data Validation to a cell that pulls from a list on a separate sheet.  Nice.

    Now for that extra piece of flare.  We need to redefine this named range.  For this go back into the Define Name – select the name and click edit; in 2007 use the “Name Manager”.

    Now, we get to use the INDIRECT from before.  We will start off nice and simple.  While the current name should be defined as ‘=Sheet2!$A$1:$A$7’ we will just make that and INDIRECT so we get : ‘=INDIRECT(“Sheet2!$A$1:$A$7”)’.  Now we want to change this so that we know how far down to go.  Right now we go to A7, but what if things are added.  We would have to redefine the name every time.  Luckily, we can use the COUNTA formula to count the number of non-empty cells.  In this case COUNTA(Sheet2!A:A) should equal 7 (one for the heading and one for each letter).

    Lets throw that into our named range definition in place of the last “7” so that we get: ‘=INDIRECT(“Sheet2!$A$1:$A$”&COUNTA(Sheet2!$A:$A))’.  Notice that we have to put in the quotation and ampersand right before the COUNTA because we are building a text string.  As a final touch lets say that we don’t want the heading the drop-down box in Sheet1!A1.  We have to change the row that the range starts on so we get : ‘=INDIRECT(“Sheet2!$A$2:$A$”&COUNTA(Sheet2!$A:$A))’.

    As a final wrench, lets just say that the list on sheet2 is moved from A1:A7 to A:3:A9 with A1 and A2 blank.  Here we would just have to add something to the formula on the end to pad it for the blank rows and change the starting row.  In this case we would end up with ‘=INDIRECT(“Sheet2!$A$4:$A$”&COUNTA(Sheet2!$A:$A)+2)’

    Let me know your thoughts on this post and if this worked for you!

    This has been a Thought From The Cake Scraps.