Results 1 to 3 of 3

Thread: Missing Numbers Range VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    2
    Rep Power
    0

    Missing Numbers Range VBA

    Rick you also posted the following code on msdn:

    Code:
    Function MissingNumbers(Rng As Range) As String
       Dim X As Long, MaxNum As Long
       MaxNum = WorksheetFunction.Max(Rng)
       ReDim Nums(1 To MaxNum)
       For X = 1 To MaxNum
         If Rng.Find(X, LookAt:=xlWhole) Is Nothing Then
           MissingNumbers = MissingNumbers & ", " & X
         End If
       Next
       MissingNumbers = Mid(MissingNumbers, 3)
     End Function
    -----

    This function was very helpful. Can you add a couple of lines that builds a string that contains the addresses of the cells within the range, or is it not possible for a UFD?
    Please advise.

    Thanks

    Rhett
    Last edited by Admin; 10-26-2013 at 11:32 AM.

Similar Threads

  1. Replies: 10
    Last Post: 08-29-2013, 08:20 PM
  2. Replies: 2
    Last Post: 07-18-2013, 03:34 AM
  3. VBA Looping Input Range and Output Range
    By Whitley in forum Excel Help
    Replies: 7
    Last Post: 04-25-2013, 09:02 PM
  4. Replies: 4
    Last Post: 04-05-2013, 12:08 PM
  5. VBA Function To Extract Decimal Numbers
    By PcMax in forum Excel Help
    Replies: 7
    Last Post: 11-19-2011, 09:42 PM

Posting Permissions

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