Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Check for missing invoice numbers


Hi All,

Firstly thanks for taking the time to look at this post.

The problem I have is relating to invoices. I have an Excel spreadshee
which I write down all payments I make for invoices. The invoice number
are always a number and started at 1 and then increment by 1. IE 1, 2,
etc.

What I would like to do is to have a way in which I could look in m
sheet to see if I have any invoices missing. ie 6 and 8 is there but
is not.

Due to the nature of invoices they are not always in order so I migh
pay 9 before I pay 8 and therefore on my spreadsheet they wont be i
order. they are currently in order of when I paid them.

Would anyone know a way I could do this?

Many tnaks agai

--
luxbo
-----------------------------------------------------------------------
luxboy's Profile: http://www.excelforum.com/member.php...fo&userid=2478
View this thread: http://www.excelforum.com/showthread.php?threadid=38345

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Check for missing invoice numbers

Could you not just have a list of functions say starting in M1

=IF(ISNUMBER(MATCH(ROW(M1,$C$!:$C$1000,0))),"",ROW (M1)&" is missing")

and just copy down. Not particularly sophisticated, but should work.

--
HTH

Bob Phillips

"luxboy" wrote in
message ...

Hi All,

Firstly thanks for taking the time to look at this post.

The problem I have is relating to invoices. I have an Excel spreadsheet
which I write down all payments I make for invoices. The invoice numbers
are always a number and started at 1 and then increment by 1. IE 1, 2,3
etc.

What I would like to do is to have a way in which I could look in my
sheet to see if I have any invoices missing. ie 6 and 8 is there but 7
is not.

Due to the nature of invoices they are not always in order so I might
pay 9 before I pay 8 and therefore on my spreadsheet they wont be in
order. they are currently in order of when I paid them.

Would anyone know a way I could do this?

Many tnaks again


--
luxboy
------------------------------------------------------------------------
luxboy's Profile:

http://www.excelforum.com/member.php...o&userid=24781
View this thread: http://www.excelforum.com/showthread...hreadid=383450



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Check for missing invoice numbers


could do it like following:

i'm sure there must be faster ways,(with sorting etc)
but this was nice and easy

copy/paste the code to a normal module.
select the range with the invoices
and fire it up..

and emm... it will check for non unique numbers too!

Sub CheckNumbers()
'needs a reference to "Microsoft Scripting Runtime"
'set via VBE Tools/References
Dim dicNrs As Scripting.Dictionary
Dim dicMis As Scripting.Dictionary
Dim dicDbl As Scripting.Dictionary
Dim rng As Range
Dim n&, nMin&, nMax&

Set dicNrs = New Dictionary
Set dicDbl = New Dictionary
Set dicMis = New Dictionary

For Each rng In ActiveWindow.RangeSelection.Cells
If Not IsEmpty(rng) Then
If dicNrs.exists(rng.Value) Then
dicDbl.Add rng.Address(0, 0), rng.Value
Else
dicNrs.Add rng.Value, Null
End If
End If
Next
nMin = Application.Min(dicNrs.Keys)
nMax = Application.Max(dicNrs.Keys)

For n = nMin To nMax
If Not dicNrs.exists(n) Then dicMis.Add n, Null
Next

If dicMis.Count = 0 Then
MsgBox "no missing"
Else
Set rng = Application.InputBox( _
dicMis.Count & " numbers missing" & vbLf & _
"select a vertical range to show them.", Type:=8)
rng.Cells(1) = "missing numbers"
rng.Cells(2).Resize(dicMis.Count) = Application.Transpose( _
dicMis.Keys)
End If

If dicDbl.Count 0 Then
Set rng = Application.InputBox( _
dicDbl.Count & " numbers double" & vbLf & _
"select a vertical range to show them.", Type:=8)
rng.Cells(1) = "double Numbers"
rng.Cells(2, _
1).Resize(dicDbl.Count) = Application.Transpose(dicDbl.Keys)
rng.Cells(2, _
2).Resize(dicDbl.Count) = Application.Transpose( _
dicDbl.items)
End If

End Sub





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


luxboy wrote :


Hi All,

Firstly thanks for taking the time to look at this post.

The problem I have is relating to invoices. I have an Excel
spreadsheet which I write down all payments I make for invoices. The
invoice numbers are always a number and started at 1 and then
increment by 1. IE 1, 2,3 etc.

What I would like to do is to have a way in which I could look in my
sheet to see if I have any invoices missing. ie 6 and 8 is there but 7
is not.

Due to the nature of invoices they are not always in order so I might
pay 9 before I pay 8 and therefore on my spreadsheet they wont be in
order. they are currently in order of when I paid them.

Would anyone know a way I could do this?

Many tnaks again

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Check for missing invoice numbers


Perfect!


Works like a charm

Many thanks indee

--
luxbo
-----------------------------------------------------------------------
luxboy's Profile: http://www.excelforum.com/member.php...fo&userid=2478
View this thread: http://www.excelforum.com/showthread.php?threadid=38345

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display Missing invoice numbers from a sequence. lrxc Excel Discussion (Misc queries) 2 November 2nd 09 10:12 PM
Invoice Numbers hilltopper_lady Excel Discussion (Misc queries) 3 December 17th 06 06:01 AM
to find missing serial numbers in randomly generated numbers B.H. Hadi Excel Worksheet Functions 2 December 1st 05 10:56 PM
missing invoice toolbar when save customised invoice M.G New Users to Excel 1 September 26th 05 07:18 AM
Invoice templet Excel97 to 2003 invoice toolbar missing MarolynInMarion Excel Discussion (Misc queries) 0 August 19th 05 07:15 PM


All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"