Show Underscore from formula bar

jaydaniel05

New Member
Joined
Aug 3, 2015
Messages
9
Hello,

I am trying to make naming my files easier. I have a spreadsheet where I have.
FILE NUMBER PROJECT NAME

My boss likes to use the naming convention of:
0001_TPR_PROJECT NAME [TPR being the company name]

I am trying to use =CONCATENATE(TEXT(A1,"0000_TPR_"), B1) but because I can't seem to get the underscores to work. Dashes work, but my boss is pretty adamant on using underscores.

Any chance anyone might have a solution if there is one?

Thank you in advance :)
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi,

What's in A1, what's in B1?
 
Upvote 0
Hi,

What's in A1, what's in B1?

Sorry, that would be helpful.....

A1: 0001_TPR_
B1: DINING-KMI0103

When I use that formula I posted, it errors out. But if I change the underscore to dashes in the file number... works perfectly :'(
=CONCATENATE(TEXT(A1,"0000-TPR-"), B1)
 
Upvote 0
Hi again,

I might be misunderstanding something here, if you already have "0001_TPR_" in A1, why do you need the TEXT function?


Book1
ABCD
10001_TPR_DINING-KMI01030001_TPR_DINING-KMI0103
Sheet64
Cell Formulas
RangeFormula
D1=CONCATENATE(A1,B1)
 
Upvote 0
Hi again,

I might be misunderstanding something here, if you already have "0001_TPR_" in A1, why do you need the TEXT function?

ABCD
10001_TPR_DINING-KMI01030001_TPR_DINING-KMI0103

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet64

Worksheet Formulas
CellFormula
D1=CONCATENATE(A1,B1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Ah, that is because i use excel to get my file numbers (click and drag) so my cells are actually regular numbers (1, 2, 3, 4, 5) and I have the cells formatted to show as
0000"_"TPR"_"

I probably made it complicated by doing that....
 
Upvote 0
Ah, that is because i use excel to get my file numbers (click and drag) so my cells are actually regular numbers (1, 2, 3, 4, 5) and I have the cells formatted to show as
0000"_"TPR"_"

I probably made it complicated by doing that....

In that case, you can do this:


Book1
ABCD
20001_TPR_DINING-KMI01030001_TPR_DINING-KMI0103
Sheet64
Cell Formulas
RangeFormula
D2=CONCATENATE(TEXT(A2,"0000")&"_TPR_",B2)


Value in A2 is just 1, custom formatted 0000"_TPR_"

You have to realize, cell Formatting Only changes the Appearance of the Value of the cell, Not the Value itself.
 
Upvote 0
OH MY GOD. THANK YOU SO MUCH!!!! I have been trying to figure this out for the last two hours! You are a lifesaver!
 
Upvote 0
You're very welcome, glad to help.
 
Upvote 0
Hello,

I am trying to make naming my files easier. I have a spreadsheet where I have.
FILE NUMBER PROJECT NAME

My boss likes to use the naming convention of:
0001_TPR_PROJECT NAME [TPR being the company name]

I am trying to use =CONCATENATE(TEXT(A1,"0000_TPR_"), B1) but because I can't seem to get the underscores to work. Dashes work, but my boss is pretty adamant on using underscores.

Any chance anyone might have a solution if there is one?

Thank you in advance :)
Hi!

You can try this too:

=TEXT(A2,"0000\_TPR\_")&B2

Markmzz
 
Upvote 0

Forum statistics

Threads
1,214,412
Messages
6,119,365
Members
448,888
Latest member
Arle8907

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