Count formula

lionelnz

Well-known Member
Joined
Apr 6, 2006
Messages
571
Good evening all.

I wish to generate a simple invoice based on the YYMM number of occurrences for a simple database to do a simple mailmerge.

Example the date of first invoice is 02/04/15 (dd/mm/yy format). I can easily generate the invoice 150401 with formula =text(date,"yymm")&"01") which gives 150401 but I want to generate the "01" automatically with some type of Countif(Range,Text("YYMM") so that it counts the number of times an invoice is generated for the month.

eg if I have a 2nd invoice dated 04/04/15 the formula will generate 150402 and all subsequent invoices will automatically count the number of dates in the month.

TIA in advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
This what I have researched and altered for me -

=TEXT(I5,"YYMM")&TEXT(SUMPRODUCT(--(TEXT($I$2:I5,"mmyyyy")=TEXT(I5,"mmyyyy"))),"00")

and to be safe I enter it as an array formula.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top