Aug 04 2021 02:25 PM
Aug 04 2021 02:25 PM
Shared sheet through SharePoint.
I have created an invoice tracking table that has about 40 columns. The formula I am currently using to create the invoice number concatenates the TRUCK#, DATE, and the addition of a counter. I have been manually adjusting this counter whenever the truck and date combination were not unique.
* Note: Each trip has a Load # associated with it that I have no control over *
I am looking for a formula that will auto increment the counter portion of my invoice number AND is not volatile (does not change when columns are sorted.) The COUNTIF function (not familiar with it) was suggested to me for creating the counter, but it seems to be volatile as this piece of the invoice number ALWAYS showed in order (1, 2, 3, ...)
This screen cap is an example of the desired results when sorting on the Load # column.
* Table may be sorted on any column
Aug 04 2021 03:11 PM
Aug 04 2021 06:08 PM
a) is it persistent
- Yes...the Load # for that trip (truck/date combination) does not change once set
b) is it unique?
- No....The Load # is set by multiple different vendors, so theoretically Vendor A may have the same Load # as Vendor B.
The truck/date/load # combination is unique though. The boss wants the "counter" instead of the load # added to the end of the invoice as the load # can be any where from 3 (smallest so far) to 11 (length is unlimited) characters (alpha/numeric) long.
Aug 04 2021 06:44 PM
Aug 04 2021 07:30 PM
Aug 04 2021 07:35 PM
Aug 04 2021 10:11 PMSolution
The time column makes it work exactly as I am looking for....assuming the user remembers to enter the current time into the sheet. Hmmmm....just couldn't rely on that. So...
I found a method that will enter the current time into the sheet automatically using the NOW() function and circular reference. Source
Formula in TIME column:
Now, using this formula to set the time in a hidden/locked cell, I can use your formula (adjusted) to get the exact outcome I am looking for.
Final formula using the new (auto populating) TIME column:
=IF([@[Truck '#]]<>"", [@[Truck '#]]&"-"&TEXT([@[SERVICE
As an added bonus, these formulas also work on the web version, so the user can enter the data from either the web browser or from within the Excel app.
Thx @mtarler for all your help