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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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,215,373
Messages
6,124,548
Members
449,170
Latest member
Gkiller

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