Forum Discussion
tapster91
May 16, 2025Copper Contributor
Add Letter Into Number
I am wanting to see if there is a way to have a letter inserted into a cell that already has a number if another cell meets a certain criteria. See below for example. Cells in Column D are prefilled...
HansVogelaar
May 16, 2025MVP
A cell cannot contain a fixed value and a formula at the same time. You might do the following:
- Enter the values in column D as 6-digit numbers: 252572, 252573, etc.
- Apply the custom number format 00"-"0000 to the values, so that they will be displayed as 25-2572 etc.
- Select D2:D100 (or as far down as needed).
- D2 should be the active cell in the selection.
- On the Home tab of the ribbon, click Conditional Formatting > New Rule...
- Select 'Use a formula to determine which cells to format'.
- Enter the formula =L2<>""
- Click Format...
- Activate the Number tab.
- Select Custom as category.
- Enter 00"H-"0000 in the Type box.
- Click OK, then click OK again.
This will always insert the letter H. If you want to insert different letters, you'd have to provide a rule to determine when to use which letter.