Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On one of my reports, I have to enter in several order numbers. The order numbers all start with the same thing, but end in different numbers. example: "XXX-XXXXX-12345-..." where the "..." represents the identifying number.

Is there a way to change what the cell shows by entering in the identifying number only? So I just want to be able to enter in "9876" and it will automatically print "XXX-XXXXX-12345-9876."

share|improve this question

2 Answers 2

To display it in the same cell, you can set a Custom Format. Use the string, including quotes:

"XXX-XXXXX-12345-"0000

Note that Excel won't read this whole string if you reference the cell somewhere else. If you type 9876, you will see XXX-XXXXX-12345-9876. If you use a formula to copy that order number, it will only copy the 9876 that you typed.


Alternatively, you can use a formula if you want the results in a different cell. Assuming you type your 9876 in cell A1:

="XXX-XXXXX-12345-"&A1
share|improve this answer

Using formulas, with the input numbers in coll b, you can just put in cell A1 ="XXX-XXXX-12345-" & b1 and drag the formula as far down as you need. Once you've entered all your numbers you can copy-paste value only and discard col. b.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.