#1
|
||||
|
||||
Last number issued in an invoice pad
This is related to my previous post.
A data sheet contains a list of invoices issued by several staff. If Ms. Alpha (I3) issued invoices numbered 6387127 to 6387132 (defined name, OR_No.), I would like the formula in K3 to return 6387132 which is the last serial number issued by Alpha from this invoice pad of 6387101 to 6387150. The first number issued during the month was 6387127, manually entered in J3. It is possible that a staff may be in charge of more than one invoice pad. I do not know how to include in the MAXIFS formula the booklet criteria. I have attached a sample sheet for more details. Thank you. |
#2
|
||||
|
||||
In your file in cell F3:
Code:
=MINIFS(Table1[OR No.],Table1[OR No.],">=" & FLOOR(Table1[@[OR No.]],50)) In cell G3: Code:
=MAXIFS(Table1[OR No.],Table1[OR No.],"<=" & CEILING(Table1[@[OR No.]],50)) |
#3
|
|||
|
|||
Does this do it?
|
#4
|
||||
|
||||
Thank you Arvi.
The formula that looks for the latest number in a series resides in another sheet. It is not part of the table in sheet1. I only placed the problem (I2:K7) in the same sheet as the data, but outside of the table. |
#5
|
||||
|
||||
Thank you p45Cal. I tweaked your formulas to conform with the actual data and report sheets.
|
#6
|
||||
|
||||
If you need to know the lowest Or. No used in a pad (you didn't ask for it in your narrative but did in your sample file) you may need a tweak to the formula I gave for that to:
=MINIFS(Table1[OR No.],Table1[OR No.],">=" & FLOOR(Table1[@[OR No.]]-0.1,50)) this is to cater for when the Or. No. was an exact multiple of 50. |
#7
|
||||
|
||||
Quote:
Thank you. |
#8
|
||||
|
||||
Well spotted! It's never as easy as you think!
In the attached, it all hinges around the adjustment of the formula in cell F3 to get the first Or no. in a pad. I've used the same adjustment in cell I3, so that no formula requires helper columns. As an aside, seeing your small table at N2 (in my attachment) I think you can probably get the information you want more reliably and flexibly by not using a single formula but using a pivot table. There's a pivot table at cell R3 where you'll see that the first column is created by grouping the Or No.s. Right-click any of the values in the first column of the pivot and choose Group… to see the grouping applied. This table gives you the max and min numbers used for each pad - no formulae. This next bit you can do yourself; add the Rep field either above or below the Or No. in the Rows area of the pivot fields. When you add it above the Or No. you get data remarkably similar to your table. The file: Excel file (It was a bit too big to attach. Click on the Download button once the link opens.) |
#9
|
||||
|
||||
Beautiful, thank you. The pivot table would be the excellent solution to the tracking and accounting of official receipts received and issued by the collection officers.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automated excel invoice clearing and saving invoice | sunboy | Excel | 2 | 09-25-2019 12:27 PM |
Add a serial number to an invoice | pringle747 | Excel Programming | 6 | 02-19-2015 11:19 AM |
Auto Generate Invoice Number Word 2013 | Jonah245 | Word VBA | 3 | 09-04-2014 05:24 PM |
Invoice number sync from different location? | lbf200n | Excel Programming | 0 | 04-10-2013 06:55 PM |
Invoice Number Generation | mrphilk | Excel | 2 | 06-08-2010 12:39 PM |