auto numbering with a part of text

already

Board Regular
Joined
Nov 11, 2008
Messages
179
Hi All,

I'm using the following formula to auto number invoices with a macro.

Range("A10").Value = Range("a10").Value + 1

But if I use inv001 it give me a mismatch error.

and if I use only 001 the invoices are numbered without the leading zero's.

I prefer the inv001 numbering and the text should be in the same cell as the number.

Any work around for this?

Thanks in advance

Kind regards

Al
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi,
create a custom format should do what you want:

Select the Cell you want to Format then From Home Tab

Format > Format Cells > Custom

Enter "Inv"000


Press OK.

Hopefully, your macro should now increment cell value as required.

Dave
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

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