Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

February 2009 - Daily Dose of Excel

  • Collections Can Be So Insensitive

    I've never noticed this before, but the Key argument of the Add method for a collection is not case sensitive. That is, this throws an error: Sub testcollection()         Dim col As Collection         Set col = New Collection         col.Add "me", "me"     col.Add "Me", "Me"     End [...] Read More...
  • Get the Path to My Documents in VBA

    VBA has an Environ function. To get a list of all the Environ variables you can see, you can use the method at VBA Express. I use the USERPROFILE argument like this Public Function MyDocsPath() As String         MyDocsPath = Environ$("USERPROFILE") & "\My Documents\"     End Function You can also use the Windows [...] Read More...
  • Euler Problem 75

    Euler Problem 75 asks: It turns out that 12 cm is the smallest length of wire that can be bent to form an integer sided right angle triangle in exactly one way, but there are many more examples. 12 cm: (3,4,5) 24 cm: (6,8,10) 30 cm: (5,12,13) 36 cm: (9,12,15) 40 cm: (8,15,17) 48 cm: (12,16,20) In contrast, some lengths of wire, like [...] Read More...
  • Euler Problem 73

    Euler Problem 73 asks: Consider the fraction, n/d, where n and d are positive integers. If n<d and HCF(n,d)=1, it is called a reduced proper fraction. If we list the set of reduced proper fractions for d <= 8 in ascending order of size, we get: 1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, 3/7, 1/2, [...] Read More...
  • Economic Stimulation

    I’m just doing my part to keep the uber consumerism going. I don’t want to be the only person in America with a savings account. And my butt hurt. So I bought a new chair. The thing about buying a new chair is that you really want to sit in it before you [...] Read More...
  • Code Snipit to Test

    All - Could some exceedingly kind wizard please run this very simple code snipit, and then explain it (the results) to me? Repeatable on my home machine and work machine running XL2002. On my Mac XL2004, I don't have this problem. Sub Test()    Const Max_P As Currency = 2000000    Dim P       As Currency    Dim [...] Read More...
  • Euler Problem 36

    Euler Problem 36 asks: 'The decimal number, 585 = 1001001001_(2) (binary), 'is palindromic in both bases. ' 'Find the sum of all numbers, less than one million, which 'are palindromic in base 10 and base 2. ' '(Please note that the palindromic number, in either base, 'may not include leading zeros.) A palindrome reads the same left-to-right as right-to-left. [...] Read More...
  • Green Eggs and Ham

    via Kottke After writing The Cat in the Hat in 1955 using only 223 words, Dr. Seuss bet his publisher that he could write a book using only 50 words. Except that the website with the text has a typo which puts the word count at 51. At least that’s what I think. I don’t [...] Read More...
  • Inflexible Find

    Ever since I’ve been using Jan Karel’s Flexfind, I don’t use Excel’s built-in Find. However, about half of the time, I don’t need any fancy options. I just need to find some text in the workbook. So I wrote a utility for myself called DDoE Quick Find. It has the [...] Read More...
  • Translating Excel Applications

    I've never translated anything I've done in Excel to any other language. As I was designing a userform the other day, I began to think about translating. How could I build this userform so that it could be translated easily? I thought about putting all of the my user interface strings in [...] Read More...
  • My own Euler problem

    Hi everyone, With all these Euler posts I thought, why not post my own? Suppose the following: I have a products table set up like this: Code ProdName Price 0001 Product1 556.68 0002 Product2 977.41 0003 Product3 350.62 0004 Product4 509.16 0005 Product5 748.4 0006 Product6 802.96 (list goes on to as much as 5000 products) And I want to show this table in a userform and give the user some filtering possibilities (lets say on the first two [...] Read More...
  • External Links

    Ron sez: What happens often is that one person will have one of these spreadsheets open and the other spreadsheets linked to the subject spreadsheet closed and decide to insert a column that throws off the references of the closed linked spreadsheets. If the person knew which spreadsheets were linked to it, the person could open [...] Read More...
  • Euler Problem 79

    Euler Problem 79 asks: 'A common security method used for online banking is to ask the user 'for three random characters from a passcode. For example, if the 'passcode was 531278, they may asked for the 2nd, 3rd, and 5th 'characters; the expected reply would be: 317. ' 'The text file, keylog.txt, contains fifty successful login attempts. ' 'Given that the three characters [...] Read More...
  • Excel Movie Reviews

    I recently watched The Contract. It was terrible. It was worse than The House Bunny (my wife picked that one, I swear). You’re probably saying, “I like John Cusack. I like Morgan Freeman.” Yes, they’re good. Everyone else in the movie is terrible. How does a really bad movie become [...] Read More...
  • Site News

    JP suggested I add an option to allow commenters to subscribe via email. I took his suggestion and installed Subscribe to Comments 2.1, so we’ll give that a go. Don’t forget that you can read all the comments quickly (and ignore the ones you don’t like just as quickly) by subscribing to the [...] Read More...
1 2 Next >
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.