Results 1 to 10 of 10

Find missing numbers in a column

Threaded View

excelkeechak Find missing numbers in a... 04-24-2009, 10:20 AM
Ron Coderre Re: Find missing numbers in a... 04-24-2009, 11:13 AM
excelkeechak Re: Find missing numbers in a... 04-24-2009, 11:19 AM
JBeaucaire Re: Find missing numbers in a... 04-24-2009, 01:04 PM
excelkeechak Re: Find missing numbers in a... 04-25-2009, 09:41 AM
JBeaucaire Re: Find missing numbers in a... 04-25-2009, 10:27 AM
DonkeyOte Re: Find missing numbers in a... 04-25-2009, 10:30 AM
JBeaucaire Re: Find missing numbers in a... 04-25-2009, 10:53 AM
DonkeyOte Re: Find missing numbers in a... 04-25-2009, 11:10 AM
excelkeechak Re: Find missing numbers in a... 04-26-2009, 12:04 AM
  1. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Find missing numbers in a column

    In VBA

    Dim a, b, c As Long
    only C is Long, a & b are Variants ... whereas in .NET a, b & c would all be Long

    As to why your code works ... VBA is designed for non-programmers ie there is the expectation that Variables may not be declared at all - hence Option Explicit is not default setting.
    Anything not declared explicitly is assiged a Variant and a Variant can be anything hence the code works regardless...
    General school of thought is: Variants = Inefficient/Expensive, however, I've heard MS MVP's say recently (Simon Hodge) that they think that's not really that significant an issue in VBA and that in reality all Cells are Variants (and there are lots of those without impacting performance!).

    Note: In .NET, code is Option Explicit and the Variant type no longer exists (one must use Object)
    Last edited by DonkeyOte; 04-25-2009 at 11:13 AM. Reason: typos

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1